Yaohui Chen, Sebassujeen Reymondjohnson, Zhichuang Sun, Long Lu
RiS3 Lab / Computer Science / Stony Brook University S H R E D S
Shreds:
Fine-grained Execution Units with Private Memory
1
Shreds: Fine-grained Execution Units with S R D H E S Private - - PowerPoint PPT Presentation
Shreds: Fine-grained Execution Units with S R D H E S Private Memory Yaohui Chen, Sebassujeen Reymondjohnson, Zhichuang Sun, Long Lu RiS3 Lab / Computer Science / Stony Brook University 1 Execution Units Traditional Execution Units
RiS3 Lab / Computer Science / Stony Brook University S H R E D S
1
Shreds: Fine-grained execution units with private memory
A Process
Threads
2
Shreds: Fine-grained execution units with private memory
3
Shreds: Fine-grained execution units with private memory
Process-level isolation
(OpenSSH, Chrome)
Software fault isolation-like techniques
(Native Client)
Hardware-assisted techniques
(SGX, Trustzone)
4
Shreds: Fine-grained execution units with private memory
Threads Shreds A process
5
Shreds: Fine-grained execution units with private memory
Executable Heap
Plaintext password Local Hash
6
Stack Kernel Libs
Shreds: Fine-grained execution units with private memory
Kernel Plaintext password S-pool Local Hash
7
Executable Heap Stack Libs
Shreds: Fine-grained execution units with private memory
Shred creation APIs S-pool allocation APIs 8
Shreds: Fine-grained execution units with private memory
9
Shreds: Fine-grained execution units with private memory
S-pool allocation APIs wrapper 10
+ ... + spool_free(ds->key); + ...
Shreds: Fine-grained execution units with private memory
11
Shreds: Fine-grained execution units with private memory
12
shred_enter (P1); shred_exit(); shred_enter (P1); shred_exit(); shred_enter (P2); shred_exit();
Thread1 Thread2
Process
Security Monitor S-pool Manager
…
S-pool: P2 S-pool: P1
S-driver
Mem Space Runtime
Shreds: Fine-grained execution units with private memory
D0 D1 D14 D15
Domain Access Control Register
D1 D14 D1
Page Directory Descriptor
Page Table Descriptor
PDE# 0 PDE# 1 PDE#1023
13 Intel: Memory protection keys
Shreds: Fine-grained execution units with private memory
1)The granularity of the accessing subject can only be checked at CPU level
2) Limited Domains: Only 16 Domains are available ✓Create the notion of shred so the accessing subject can be recognized and use S-driver to manage them ✓Statically bind an accessible domain to each CPU ✓Reuse a domain for multiple S-pools if they are accessed from the same CPU
Domain Access Control Register Domain Access Control Register
Core #1 Core #2
s-pool #1 s-pool #2
Virtual Address Space
14
Shreds: Fine-grained execution units with private memory
15
Shreds: Fine-grained execution units with private memory
16
Shreds: Fine-grained execution units with private memory
17
Shreds: Fine-grained execution units with private memory
Shred- hardening Analyses
S-compiler
Development and build
… int enc(x) { … shred_enter(p1); //encryption logic shred_exit(); … 18
๏ Shred usage verification ๏ Associate each shred with its s-pool ๏ Control flow hardening for in-shred code ๏ Data flow checking to prevent direct-propagation
S h r e d s : F i n e
r a i n e d E x e c u t i
U n i t s w i t h P r i v a t e M e m
y
Y a
u i C h e n S e b a s s u j e e n R e y m
d j
n s
Z h i c h u a n g S u n L
g L u
D e p a r t m e n t
C
p u t e r S c i e n c e S t
y B r
U n i v e r s i t y { y a
c h e n , s r e y m
d j
n , z h i s u n , l
g } @ c s . s t
y b r
. e d u A b s t r a c t — O n c e a t t a c k e r s h a v e i n j e c t e d c
e i n t
v i c t i m p r
r a m ’ s a d d r e s s s p a c e ,
f
n d a m e m
y d i s c l
u r e v u l n e r
b i l i t y , a l l s e n s i t i v e d a t a a n d c
e i n s i d e t h a t a d d r e s s s p a c e a r e s u b j e c t t
h e f t s
m a n i p u l a t i
. U n f
t u n a t e l y , t h i s b r
d t y p e
a t t a c k i s h a r d t
r e v e n t , e v e n i f s
t w a r e d e v e l
e r s w i s h t
e r a t e , m
t l y b e c a u s e t h e c
v e n t i
a l m e m
y p r
e c t i
l y w
k s a t p r
e s s l e v e l a n d p r e v i
s l y p r
e d i n
r
e s s i s
a t i
m e t h
s a r e n
p r a c t i c a l f
w i d e a d
t i
. s h r e d s , a s e t
O S
a c k e d p r
r a m m i n g p r i m i
e v e l
e r s ’ c u r r e n t l y u n m e t n e e d s f
fi n e
f fi c i e n t p r
e c t i
s e n s i t i v e m e m
y e r s a r i e s . A s h r e d c a n b e v i e w e d a s e x e c u t i
( h e n c e t h e n a m e ) . m e m
y p
, w h i c h U n l i k e p r e v i
s r e l y i n g
w a r e .
process remains an open issue, which has been increasingly exploited by attackers. To address this open issue, some recent work proposed the thread-level memory isolation [3], which allows developers to limit the sharing of a thread’s memory space with other threads in the same process. However, this line of works faces three major limitations. First, thread-level memory isolation is still too coarse to stop in-process abuse because exploitable or malicious code often run in the same thread as the legitimate code that needs to access sensitive memory content. Sec-
threads (i.e., scheduling units) demands major design changes, as opposed to regional code patches, to deal with the added
incur much higher overhead than normal threads due to the additional page table switches, TLB flushes, or nested page management upon context switches. We aim to tackle proposing a practical and effective system memory. w execution unit for user- represents an arbitrarily and is granted shred- relation
Shreds: Fine-grained execution units with private memory
๏ Hardware spec: Raspberry Pi 2 Model B (Quad-core Cortex-A7 Processor with 1GB RAM) Softwares Low overhead ๏ Curl ๏ Minizip ๏ OpenSSH ๏ OpenSSL ๏ Lighttpd ๏ Avg. 4.67% slowdown ๏ Avg. 7.26% RSS(resident set size) overhead Easy adoption ๏ Avg. 21 SLOC change ๏ Avg. 32 min adoption time
19
Shreds: Fine-grained execution units with private memory
20
Shreds: Fine-grained execution units with private memory
21