https://github.com/0xade1a1de/uslh

Artifact for paper: Breaking and Fixing Speculative Load Hardening

https://github.com/0xade1a1de/uslh

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.2%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Artifact for paper: Breaking and Fixing Speculative Load Hardening

Basic Info
  • Host: GitHub
  • Owner: 0xADE1A1DE
  • License: apache-2.0
  • Language: C++
  • Default Branch: master
  • Homepage:
  • Size: 2.61 MB
Statistics
  • Stars: 11
  • Watchers: 5
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Created about 4 years ago · Last pushed over 2 years ago
Metadata Files
Readme License

README.md

Ultimate SLH: Taking Speculative Load Hardening to the Next Level

Authors: Zhiyuan Zhang, Gilles Barthe, Chitchanok Chuengsatiansup, Peter Schwabe, Yuval Yarom.

The paper is accepted in USENIX Security 2023 Fall Round (A preprint verstion of the paper is available at paper)

Ultimate SLH

Experiment Environment

The experiments have been tested on 8th(i5-8265U), 9th (i7-9750H), 10th(i7-10710U) Gen Intel Processors running Ubuntu 20.04.
To compile the customized LLVM, you will need at least 8GB RAM.

Limits of SLH

In the paper, we evaulate several limits of implemented LLVM SLH and Strong SLH.
We firstly demonstrate that a secret value may flow into a register which is used for conditional control flow transfer. It can be leaked by monitoring which branch is taken from a covert channel.
We then demonstrate that variable-timing instruction under speculative execution is also vulnerable.
We show that the secret can be leaked from a memory access to a public fixed address which is not secret relevant.

Fix SLH

We fix the SLH by extending the work to match the description of SSLH and we further protect the variable-timing instructions.

Artifact Evaluation

Please set processor governor to performance to get stable result for evaluating the artifact.
You can achieve this with cpupower command.

General Setting

Please set the processor governor to performance for evaluating the artifact.

USLH: To fix SLH

We provide code for USLH under folder \LLVM_FIX. Please follow the instructions on README to compile it. It may take a while to compile ;) (On i7-10710U, 4.1GHz, it takes 40 minutes)

Resolving branch condition

SLH protects values loaded from the memory but not values in the register.
We demonstrate that a nested branch can leak secret by resolving a branch speculatively.
We further show that the the issue can be fixed by hardening the branch conditions in extra.
You can find more information under PoC/condition

Variable-time instructions

In the paper, we present a PoC of exploting variable-timem instructions: sqrtsd.
The root cause of the attack is that the speculative window is restricted the Reservation Station.(RS)
In cases that the size of Reorder Buffer (ROB) is large enough and time of solving branch condition is long enough, the limitation of RS may prevent the schedule of some operations such as memory accesses.

In the artifact evaluation, we provide code to evaluate if the processor is vulnerable to variable-time instructions under speculative execution (See PoC/testrslimit).
Further we provide code to evaulate a PoC attack in PoC/variable_time. You can evaluate both the attack and mitigation.

Gadget Searching

In the modified LLVM code we provide, we also include an llvm backend pass that performs static analysis on the source code during the compilarion. Please refer to folder LLVM_FIX for more information.

Acknowledgements

This project was supported by:

  • an ARC Discovery Early Career Researcher Award DE200101577
  • an ARC Discovery Project number DP210102670
  • the Blavatnik ICRC at Tel-Aviv University
  • the European Commission through the ERC Starting Grant 805031 (EPOQUE)
  • Deutsche Forschungsgemeinschaft (DFG, German research Foundation) as part of the Excellence Strategy of the German Federal and State Governments – EXC 2092 CASA - 390781972
  • the German Federal Ministry of Education and Research (BMBF) in the course of the 6GEM research hub under grant number 16KISK038
  • and a gift by Google.

Owner

  • Name: 0xADE1A1DE
  • Login: 0xADE1A1DE
  • Kind: organization

GitHub Events

Total
  • Watch event: 1
  • Fork event: 1
Last Year
  • Watch event: 1
  • Fork event: 1

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: 18 days
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 2.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • canertol (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels