upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf ·...

26
Programmable Hardware Support for Ubiquitous MicroPolicy Enforcement André DeHon, Benjamin C. Pierce University of Pennsylvania (joint work with Harvard and BAE) HCSS, May 2014 1 DeHon, Pierce May 2014

Transcript of upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf ·...

Page 1: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

Programmable  Hardware  Support  for    Ubiquitous  Micro-­‐Policy  Enforcement  

André  DeHon,  Benjamin  C.  Pierce  University  of  Pennsylvania  

(joint  work  with  Harvard  and  BAE)    

HCSS,  May  2014  

1  DeHon,  Pierce  -­‐-­‐  May  2014  

Page 2: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

Where  are  we?  

DeHon,  Pierce  -­‐-­‐  May  2014  2  

 Nowhere  good  

(wrt.  soQware  security)  

Page 3: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

How  did  we  get  here?  

Lots  of  reasons!  

Among  them…  – Legacy  of  technology  of  the  1960s  -­‐  80s  •  Expensive  hardware  •  Limited  verificaZon  capabiliZes  •  Few  computers,  protecZng  a  li\le,  not  networked  

– Poor  HW  abstracZons,  high  performance  cost  to  isolaZon  

DeHon,  Pierce–  May  2014  3  

Page 4: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

What’s  Changed?  

•  Bigger  soQware  –  (harder  to  get  right)  

•  Ubiquitous  networking  •  ProtecZng  more  valuable  stuff  

But  also…  •  4+  decades  of  Moore’s  Law  – Hardware  is  cheap  

•  Huge  progress  in  formalizing  /  verifying  soQware  

DeHon,  Pierce  –  May  2014  4  

Page 5: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

Our  Goals  

Idea:  Make  hardware  enforce  more  invariants  – Must  first  communicate  invariants  to  the  hardware!  

Win:  –  Programmable  hardware  supports  a  wide  range  of  policies  and  allows  rapid  adaptaZon  to  threats  

– Ubiquitous  policy  enforcement  at  all  system  levels  –  Safety  interlock:    tolerate  errors  in  operaZon  (bugs  in  trusted  code,  transient  errors)  

DeHon,  Pierce  -­‐-­‐  May  2014  5  

Page 6: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

HARDWARE  ARCHITECTURE  

DeHon,  Pierce  -­‐-­‐  May  2014  6  

Page 7: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

PUMP  Architecture  

•  Add  full  word-­‐sized  tag  to  every  word  –  In  memory,  cache,  register  file…  –  (Conceptual  model:  efficient  implementaZons  may  compress!)  

•  Tagged  word  is  indivisible  atom  in  machine  •  Process  tags  in  parallel  with  ALU  operaZons  – Hardware  rule  cache  – So6ware  policy  system  that  fills  hardware  cache  as  needed  

DeHon,  Pierce  -­‐-­‐  May  2014  7  

(Programmable  Unit  for  Metadata  Processing)  

Page 8: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

Process  Tags  in  Parallel  

DeHon,  Pierce  -­‐-­‐  May  2014  8  

ConvenZonal  processor   Processor  +  PUMP  

Page 9: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

Integrate  PUMP  into  ConvenZonal  RISC  Processor  Pipeline  

DeHon,  Pierce  -­‐-­‐  May  2014  9  

TMU!

Page 10: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

EXAMPLE:    INFORMATION-­‐FLOW  CONTROL  

DeHon,  Pierce,  Smith  -­‐-­‐  April  2014  10  

Page 11: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

ALU   PUMP  

rule  cache  add(public,public)! à public!add(secret,secret)! à secret!!

so7ware  

hardware  

ground  rules  

user  code  

...!add r1 r2 r3!add r1 r4 r5!...!!

add(secret,secret)!

secret!

...!

rule  cache  manager  

add(L1,L2) à max(L1,L2)!...!

symbolic  rules  

Page 12: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

ALU   PUMP  

rule  cache  add(public,public)! à public!add(secret,secret)! à secret!!

so7ware  

hardware  

ground  rules  

user  code  

...!add r1 r2 r3!add r1 r4 r5!...!!

add(public,secret)!

...!

rule  cache  manager  

add(L1,L2) à max(L1,L2)!...!

symbolic  rules  

trap  

add(public,secret)! à secret!!

install  

Page 13: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

ALU   PUMP  

rule  cache  add(public,public)! à public!add(secret,secret)! à secret!!

so7ware  

hardware  

ground  rules  

user  code  

...!add r1 r2 r3!add r1 r4 r5!...!!

add(public,secret)!

secret!

...!

rule  cache  manager  

add(L1,L2) à max(L1,L2)!...!

symbolic  rules  

add(public,secret)! à secret!!

Page 14: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

Scaling  up  to  Full  IFC  

•  Tag  on  PC  tracks  implicit  flows  

•  Word-­‐sized  tags  can  hold  pointers  to  arbitrary  data  structures  à labels  can  represent,  for  example,  sets  of  principals  

DeHon,  Pierce,  Smith  -­‐-­‐  April  2014  14  

Page 15: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

ProtecZng  the  Protector  

Q:  How  do  we  prevent  the  a\acker  gaining  control  of  the  PUMP  itself?  A:  Ground  rules  •  Installed  at  boot  Zme  (by  trusted  boot  sequence)  •  Allow  tag-­‐manipulaZng  instrucZons  only  in  carefully  

controlled  contexts  

DeHon,  Pierce,  Smith  -­‐-­‐  April  2014  15  

Page 16: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

The  Role  of  Formal  Methods  

Q:  The  interplay  between  the  hardware  rule  cache,  the  soQware  rule  cache  manager,  the  ground  rules,  and  the  symbolic  policy  is  somewhat  intricate…  – How  do  we  know  that  it  works  correctly  in  all  cases?  – How  do  we  know  that  the  symbolic  policy  is  what  the  user  intends?  

A:  Though  complex,  this  is  a  small  enough  arZfact  that  we  can  hope  to  prove  these  properZes  

DeHon,  Pierce,  Smith  -­‐-­‐  April  2014  16  

Page 17: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

Formal  Methods:  Status  

•  Formal,  machine-­‐checked  proofs  (in  Coq)  of    –  noninterference  for  a  simple  symbolic  IFC  policy  –  correct  implementaZon  of  this  policy  by  a  rule-­‐table  compiler  and  rule  cache  handler  rouZne  (on  a  simplified  hardware  architecture)  

•  Currently  extending  both  methodologies  to  more  realisZc  models,  including  –  protecZon  and  compartmentalizaZon  of  kernel  code  –  addiZonal  policies  beyond  IFC…  

DeHon,  Pierce,  Smith  -­‐-­‐  April  2014  17  

[POPL14,  S&P13]    

Page 18: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

MICRO-­‐POLICIES  

DeHon,  Pierce  -­‐-­‐  May  2014  18  

Page 19: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

Micro-­‐Policies  •  InformaZon-­‐Flow  Control  •  Signing    •  Sealing    •  Endorsement  •  Taint    •  ConfidenZality  •  Low-­‐Level  Type  Safety  •  Memory  Safety  •  Control-­‐Flow  Integrity    •  Stack  Safety    •  Unforgeable  Resource  IdenZfiers    •  Abstract  Types  •  Immutability    •  Linearity    •  SoQware  Architecture  Enforcement    •  Numeric  Units    

•  Mandatory  Access  Control    •  ClassificaZon  levels  •  Lightweight  compartmentalizaZon  •  Sandboxing  •  Access  control    •  CapabiliZes  •  Provenance  •  Full/Empty  Bits  •  Concurrency:  Race  DetecZon  •  Debugging  •  Data  tracing  •  IntrospecZon  •  Audit  •  Reference  monitors    •  GC  support  •  Bignum  common  cases    

DeHon,  Pierce  -­‐-­‐  May  2014  19  

Page 20: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

Symbolic  Rules  

DeHon,  Pierce  -­‐-­‐  May  2014  20  

input  tags  

output  tags   side  condi=on  

Page 21: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

Control-­‐Flow  Integrity  

•  Tags:  Each  instrucZon  that  can  be  the  source  or  target  of  a  control-­‐flow  edge  is  tagged  (by  compiler)  with  a  unique  tag  

•  Rules:  – On  a  jump,  call,  or  return,  copy  tag  of  current  instrucZon  onto  tag  of  PC  

– Whenever  PC  tag  is  nonempty,  compare  it  with  current  instrucZon  tag(and  abort  on  mismatch)  

DeHon,  Pierce  -­‐-­‐  May  2014  21  

Page 22: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

Memory  Safety  

•  Tags:    –  Each  call  to  malloc  generates  a  fresh  tag  T  – Newly  allocated  memory  cells  tagged  with  T  –  Pointer  to  new  region  tagged  “pointer  to  T”      

•  Rules:  –  Load  and  store  instrucZons  check  that  their  targets  are  tagged  “pointer  to  T”  and  that  the  referenced  memory  cell  is  tagged  T  (for  the  same  T!)  

–  Pointer  arithmeZc  instrucZons  preserve  “pointer  to  T”  tags  

DeHon,  Pierce  -­‐-­‐  May  2014  22  

Page 23: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

Performance  Overhead  (SPEC2006)  

DeHon,  Pierce  -­‐-­‐  May  2014  23  

[HASP  2014]  

Page 24: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

FINISHING  UP…  

DeHon,  Pierce  -­‐-­‐  May  2014  24  

Page 25: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

Future  Work  

•  Micro-­‐architectural  opZmizaZon    – Reduce  energy,  area,  delay  overhead  

•  Define  more  µPolicies,  characterize  security  properZes,  implement,  formally  validate  

•  Understand  policy  composiZon  •  Use  to  compartmentalize,  shrink  trusted  compuZng  base  

DeHon,  Pierce  -­‐-­‐  May  2014  25  

Page 26: upolicies may06 2014 - Information and Computer Sciencebcpierce/papers/hcss2014-slides.pdf · Where*are*we?* DeHon,*Pierce*99*May*2014* 2 Nowheregood (wrt.*soQware*security)*

Conclusion  

•  Host  of  security  problems  arise  from  violaZon  of  well-­‐understood  low-­‐level  invariants  

•  Spend  modest  hardware  to  check  – Ubiquitously  enforce  in  parallel  with  execuZon  

•  Programmable  PUMP  Model  – Richness  and  flexibility  of  soQware…  – …with  the  performance  of  hardware!  – Reduce  or  eliminate  security/performance  tradeoff  

DeHon,  Pierce  -­‐-­‐  May  2014  26