Time Protection: The Missing OS Abstraction Qian Ge, Yuval Yarom, Tom Chothia, Gernot Heiser qian.ge@data61.csiro.au www.data61.csiro.au
Top secret Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �2
Enforcing time protection at the OS level Security Domain Security Domain Sending information through timing Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �3
Enforcing time protection at the OS level Security Domain Security Domain Sending information through timing Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �3
Enforcing time protection at the OS level Security Domain Security Domain Sending information through timing Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �3
Microarchitectural Timing Channels Security Domain Security Domain Shared hardware caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �4
Microarchitectural Timing Channels Welcome to Dresden Security Domain Security Domain Shared hardware caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �4
Microarchitectural Timing Channels Welcome to Dresden Security Domain Security Domain Shared hardware caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �4
Microarchitectural Timing Channels Welcome to Dresden Security Domain Security Domain Shared hardware caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �4
Microarchitectural Timing Channels Fast Fast Slow Fast Fast Welcome to Dresden ….. S F S FFF SSSS F Security Domain Security Domain Not English, but our protocol… Shared hardware caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �4
Contention, Contention, Contention… • Contention leaks information via timing • Caches: • capacity-limited … • stateful Shared hardware caches • Resulting on temporal interference during: - time-shared access - concurrent access Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �5
Contention, Contention, Contention… • Contention leaks information via timing • Caches: • capacity-limited … • stateful Shared hardware caches • Resulting on temporal interference during: - time-shared access Any state-holding microarchitectural feature: - concurrent access • Caches, branch predictor, TLB Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �5
Preventing Contention by Partitioning Security Domain Security Domain Partitioned caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au
Spatial Partitioning Cache colouring: • Distributing coloured cache sets Cache Cache to coloured memory frames • Memory management policy Memory RAM Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �7
Spatial Partitioning Cache colouring: • Distributing coloured cache sets Cache Cache to coloured memory frames • Memory management policy Memory RAM Partition security domains on disjoint cache sets … Shared hardware caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �7
Spatial Partitioning Cache colouring: • Distributing coloured cache sets Cache Cache to coloured memory frames • Memory management policy Memory RAM Partition security domains on disjoint cache sets • Resulting on temporal interference during: - time-shared access … - concurrent access Shared hardware caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �7
Spatial Partitioning Cache colouring: • Distributing coloured cache sets Cache Cache to coloured memory frames • Memory management policy Memory RAM Partition security domains on disjoint cache sets • Resulting on temporal interference during: - time-shared access … - concurrent access Shared hardware caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �7
Spatial Partitioning Cache colouring: • Distributing coloured cache sets Cache Cache to coloured memory frames • Memory management policy Memory RAM Partition security domains on disjoint cache sets • Resulting on temporal interference during: - time-shared access … - concurrent access Shared hardware caches Cannot be supported by on-core caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �7
Temporal Partitioning Flushing on-core caches: • Resetting states Context switch … Shared on-caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �8
Temporal Partitioning Flushing on-core caches: • Resetting states Context switch • Resulting on temporal … interference during: Shared on-caches - time-shared access - concurrent access Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �8
Temporal Partitioning Flushing on-core caches: • Resetting states Context switch • Resulting on temporal … interference during: Shared on-caches - time-shared access - concurrent access Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �8
Preventing Temporal Interference through Partitioning Security Domain Security Domain Context Temporal partitioning … Spatial partitioning … Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �9
Wait, Everyone Shares the Kernel…. Security Domain Security Domain A shared partition Kernel Services … Shared hardware caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �10
Wait, Everyone Shares the Kernel…. Security Domain Security Domain A shared partition Cache lines used by the kernel Kernel Services collide with Spy’s partition … Shared hardware caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �10
Wait, Everyone Shares the Kernel…. Poster Session Security Domain Security Domain @ 17:15 A shared partition Cache lines used by the kernel Kernel Services collide with Spy’s partition … Shared hardware caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �10
Wait, Everyone Shares the Kernel…. Fast Fast Slow Fast Fast Poster Session ….. S F S FFF SSSS F Security Domain Security Domain @ 17:15 A shared partition Cache lines used by the kernel Kernel Services collide with Spy’s partition … Shared hardware caches Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �10
Kernel Services Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �11
Cloning the Kernel Image Analysing the kernel sections .text .rodata .data Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �12
Cloning the Kernel Image Duplicated sections Analysing the .text kernel sections .text .rodata .rodata Maintaining .data coherency .data Global (9KiB) Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �12
Cloning the Kernel Image Duplicated sections Analysing the .text kernel sections .text .rodata .rodata Maintaining .data coherency .data Global (9KiB) Kernel Clone: Generating a copy of the kernel image with user-level managed memory Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �12
Cloning the Kernel Image Duplicated sections Analysing the .text kernel sections .text .rodata .rodata Maintaining .data coherency .data Global (9KiB) Kernel Clone: Generating a copy of the kernel image with user-level managed memory Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �12
Dedicated Kernel Images Security Domain Security Domain Shared Global Data Context Temporal partitioning Deterministic usage … Spatial partitioning … Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �13
Timing Channel through the Shared Kernel Channel matrix: conditional probability of observing the output signal (time, Output (cycles) spy) given the input signal (system-call number, Trojan) Raw channel Horizontal variation Input (taking seL4 syscall) seL4 system call indicates a channel Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �14
Timing Channel through the Shared Kernel Channel matrix: conditional probability of observing the output signal (time, Output (cycles) spy) given the input signal (system-call number, Trojan) Raw channel Horizontal variation Input (taking seL4 syscall) seL4 system call indicates a channel Output (cycles) Prevented by cloned kernel Input (taking seL4 syscall) Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �14
How realistic is cloning? x86 Arm 224 KiB 120 KiB .text Memory consumption .rodata .data Arch seL4 Linux Global (9KiB) Clone fork + exec x86 79 μs 257 μs Arm 608 μs 4,300 μs Efficiency Time Protection: The Missing OS Abstraction qian.ge@data61.csiro.au �15
Recommend
More recommend