https://trustworthy.systems
Security Needs a Better Hardware-Software Contract
Gernot Heiser | gernot@unsw.edu.au | @GernotHeiser
- DAC’19, Las Vegas, 5 June 2019
Security Needs a Better Hardware-Software Contract Gernot Heiser | - - PowerPoint PPT Presentation
Security Needs a Better Hardware-Software Contract Gernot Heiser | gernot@unsw.edu.au | @GernotHeiser DAC19, Las Vegas, 5 June 2019 https://trustworthy.systems Threats Speculation An unknown unknown until recently A known
https://trustworthy.systems
Gernot Heiser | gernot@unsw.edu.au | @GernotHeiser
DAC, Las Vegas, 5 June 2019 2 |
An “unknown unknown” until recently A “known unknown” for decades
DAC, Las Vegas, 5 June 2019 3 |
DAC, Las Vegas, 5 June 2019 4 |
High Low Trojan encodes info Spy
Attacker
Victim executes normally
DAC, Las Vegas, 5 June 2019 5 |
Affect execution speed Shared hardware
High Low
DAC, Las Vegas, 5 June 2019 6 |
DAC, Las Vegas, 5 June 2019 7 |
Operating System Hardware (CPU etc) High Low
Provide mechanisms Enforce policies HW-SW Contract
DAC, Las Vegas, 5 June 2019 8 |
DAC, Las Vegas, 5 June 2019 9 |
High Low
Observe execution speed: Confidentiality violation Affect execution speed: Availability violation
DAC, Las Vegas, 5 June 2019 10 |
DAC, Las Vegas, 5 June 2019 11 |
High Low
Low High Cache
Flush Temporally partition Cannot spatially partition on- core caches (L1, TLB, branch predictor, pre-fetchers)
Low Cache High Low High Cache
Spatially partition Flushing useless for concurrent access
Need both! Need both!
DAC, Las Vegas, 5 June 2019 12 |
DAC, Las Vegas, 5 June 2019 13 |
On-core state Off-core state & stateless HW
H/W is bandwidth-limited
access
addresses
patterns
side channel
DAC, Las Vegas, 5 June 2019 14 |
High Low
HW is capacity-limited
Any state-holding microarchitectural feature:
DAC, Las Vegas, 5 June 2019 15 |
High Low
DAC, Las Vegas, 5 June 2019 16 |
DAC, Las Vegas, 5 June 2019 17 |
Cache RAM
⇒ colouring userland colours dynamic kernel memory
[Ge et al. EuroSys’19] High Low
TCB PT PT TCB
DAC, Las Vegas, 5 June 2019 18 |
Latency depends
Time padding to Remove dependency Ensure deterministic execution
DAC, Las Vegas, 5 June 2019 19 |
DAC, Las Vegas, 5 June 2019 20 |
Low High Cache
Flush
Low Cache High
DAC, Las Vegas, 5 June 2019 21 |
Output Signal
Input Signal High Low Trojan encodes Spy
DAC, Las Vegas, 5 June 2019 22 |
7000 8000 9000 10000 11000 12000 10 20 30 40 50 60 Probing time (cycles) Cache sets accessed datafile using 1:2:($3>pmax ? pmax : $3) 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
Horizontal variation indicates channel Raw I-cache channel Intel Sandy Bridge Channel Matrix:
DAC, Las Vegas, 5 June 2019 23 |
60000 61000 62000 63000 64000 10 20 30 40 50 60 Time (cycles) datafile using 1:2:3 0.001 0.01
Intel Sandy Bridge
12500 13000 13500 14000 2 4 6 8 10 Time (cycles) datafile using 1:2:3 0.001 0.01
Intel Haswell
7000 8000 9000 10000 11000 10 20 30 40 50 60 Output (cycles) Input (sets) datafile using 1:2:3 0.00010 0.00100 Intel Skylake 90000 92000 94000 5 10 15 20 25 30 35 40 Time (cycles) Cache sets datafile using 1:2:3 0.00010 0.00100 HiSilicon A53
DAC, Las Vegas, 5 June 2019 24 |
0 1
10-1 10-3 10-2 10-4 10-5 400 600 800 1000 Trojan signal Spy execution time Branch history buffer (BHB)
Channel!
DAC, Las Vegas, 5 June 2019 25 |
31000 32000 33000 34000 3500 4000 4500 5000 Time (cycles) datafile using 1:2:3 0.001 0.01
Spy execution time Trojan cache footprint Channel! Found residual channels in all recent Intel and ARM processors examined! Branch target buffer
applied
DAC, Las Vegas, 5 June 2019 26 |
Intel added indirect branch control (IBC) feature, which closes most channels, but… Intel Skylake Branch history buffer Small channel! https://ts.data61.csiro.au/projects/TS/timingchannels/arch-mitigation.pml
DAC, Las Vegas, 5 June 2019 27 |
For all shared microarchitectural resources: 1. Resource must be spatially partitionable or flushable 2. Concurrently shared resources must be spatially partitioned 3. Resource accessed solely by virtual address must be flushed and not concurrently accessed
4. Mechanisms must be sufficiently specified for OS to partition or reset 5. Mechanisms must be constant time, or of specified, bounded latency 6. Desirable: OS should know if resettable state is derived from data, instructions, data addresses or instruction addresses Augmented ISA supporting time protection
DAC, Las Vegas, 5 June 2019 28 |
https://trustworthy.systems
Gernot Heiser | gernot@unsw.edu.au | @GernotHeiser