nickel a framework for design and verification of
play

Nickel: A framework for design and verification of information flow - PowerPoint PPT Presentation

Nickel: A framework for design and verification of information flow control systems Luke Nelson Joint work with Helgi Sigurbjarnarson, Bruno Castro-Karney, James Bornholt, Emina Torlak, Xi Wang 2018 New England Systems Verification Day 1


  1. Nickel: A framework for design and verification of information flow control systems Luke Nelson Joint work with Helgi Sigurbjarnarson, Bruno Castro-Karney, James Bornholt, Emina Torlak, Xi Wang 2018 New England Systems Verification Day � 1

  2. Motivation: high verification burden • Verification is effective at eliminating bugs • Requires expertise • Large time investment � 2

  3. Approach: push-button verification Crash-safe filesystems (Python) Yggdrasil OSDI 2016 Small OS kernel (C, memory isolation) Hyperkernel SOSP 2017 Information flow control systems Nickel OSDI 2018 � 3

  4. Information flow control systems

  5. Goal: eliminate covert channels from systems • Covert channel (Lampson ’73) : unintended flow between system components • Approach : verification-driven development • Verify noninterference for interface specification • Verify refinement for implementation • Limitations : no physical channels; no concurrency � 7

  6. Contributions • Formulation of noninterference amenable to automated verification • Nickel is a framework for verifying IFC systems. • Applied Nickel to verify systems including • NiStar: first formally verified DIFC OS kernel • ARINC 653 communication interface: avionics kernel standard � 8

  7. Example covert channel: resource names Policy : process A and process B should not communicate Interface : spawn system call returns sequential PIDs Try to violate policy by sending a secret (in this case, 2) to process B 2 Process A Process B � 9

  8. Example covert channel: resource names Policy : process A and process B should not communicate Interface : spawn system call returns sequential PIDs Process A Process B 6-3-1= 2 spawn → 3 spawn → 4 spawn → 5 spawn → 6 � 10

  9. Noninterference intuition Process A Process A Process B Process B spawn → 4 spawn → 5 spawn → 6 spawn → 3 Process B Process B spawn → 4 spawn → 3 � 11

  10. Noninterference intuition Many kinds of covert channels Process A Process A • Resource names and exhaustion Process B Process B spawn → 4 spawn → 5 spawn → 6 spawn → 3 • Statistical information • Error handling • Scheduling Process B Process B • Devices and services spawn → 4 spawn → 3 � 12

  11. Noninterference For any trace tr, action a, removing “irrelevant” actions should not affect the output of a. output ( run ( init , tr ), a ) = output ( run ( init , purge* ( tr , a )), a ) � 13

  12. Information flow policies in Nickel D : Set A set of domains A can-flow-to relation specifying permitted ⇝ ⊆ ( D × D ) flows among domains A function mapping an dom : ( A × S ) → D action in a state to a domain pid 1 pid 2 pid n � 14

  13. Automated verification of noninterference Proof strategy : unwinding conditions • Together imply noninterference • Reason about one action at a time • Amenable to SMT solving using Z3 v I ( s ) ∧ ¬( dom ( a , s ) ⇝ v ) → s ≈ step(s, a) Local respect I ( s ) ∧ I ( t ) ∧ s dom ( a , s ) Output consistency t → output ( s , a ) = output ( t , a ) ≈ ≈ t ∧ s dom ( a , s ) Weak step consistency u u t → step(s, a) ≈ step ( t , a ) I ( s ) ∧ I ( t ) ∧ s ≈ � 15

  14. Nickel workflow Counterexample Design Verify interface Interface Specify interface against policy noninterference policy Counterexample Verify Implement implementation interface against interface Implementation noninterference and functional correctness � 16

  15. Programmer inputs Information flow policy Interface specification Observational equivalence � 17

  16. Information flow policy Interface specification Observational equivalence n processes that are not allowed to communicate pid 1 pid 2 pid n � 18

  17. Information flow policy Interface specification Observational equivalence n processes that are not allowed to communicate class State : current = PidT() nr_procs = SizeT() proc_status = Map(PidT, StatusT) def can_flow_to(domain1, domain2): # Flow only permitted if same domain return domain1 == domain2 def dom(action, state): # Domain of each action is current process return state.current pid 1 pid 2 pid n � 19

  18. Information flow policy Interface specification Observational equivalence def sys_spawn(old): Compute child pid child_pid = old.nr_procs + 1 Precondition for pre = child_pid <= NR_PROCS system call new = old.copy() Update system state new.nr_procs += 1 new.proc_status[child_pid] = RUNNABLE Return new state return pre, If (pre, new, old) � 20

  19. Information flow policy Interface specification Observational equivalence pid 4 State 1 ≈ State 2 current current nr_procs nr_procs proc_status[3] proc_status[3] proc_status[4] proc_status[4] � 21

  20. Information flow policy Interface specification Observational equivalence class State : current = PidT() nr_procs = SizeT() proc_status = Map(PidT, StatusT) def obs_eqv(domain, state1, state2): return And( state1.current == state2.current, state1.nr_procs == state2.nr_procs, state1.proc_status[domain.pid] == state2.proc_status[domain.pid] ) pid 4 State 1 ≈ State 2 current current nr_procs nr_procs proc_status[3] proc_status[3] proc_status[4] proc_status[4] � 22

  21. Systems verified using Nickel Component NiStar NiKOS ARINC 653 Information flow policy 26 14 33 Interface specification 714 82 240 Observational equivalence 127 56 80 Implementation 3,155 343 — User-space implementation 9,348 389 — Common kernel infrastructure 4,829 (shared by NiStar/NiKOS) — � 23

  22. Demo

  23. spawn example pid 1 pid 2 pid n � 25

  24. tainting example send(B, 12) Process A Process B Process C Process D Value: 0 Value: 42 Value: 3 Value: 5 Level: tainted Level: untainted Level: untainted Level: tainted � 26

  25. tainting example send(B, 12) Process A Process B Process C Process D Value: 0 Value: 12 Value: 3 Value: 5 Level: tainted Level: tainted Level: untainted Level: tainted � 27

  26. tainting example Process A if Value == 0: wait(500) send(B, 0) if Level != tainted: Value: secret_bit send(C, 1) Level: tainted Process B Value: 0 wait(1000) Process C Level: untainted if Value == 0: # secret is 0 Value: 0 else: # secret is 1 Level: untainted � 28

  27. tainting example Process A if Value == 0: wait(500) send(B, 0) if Level != tainted: Value: 1 send(C, 1) Level: tainted Process B Value: 0 wait(1000) Process C Level: untainted if Value == 0: # secret is 0 Value: 1 else: # secret is 1 Level: untainted send(C, 1) � 29

  28. tainting example Process A if Value == 0: wait(500) send(B, 0) if Level != tainted: Value: 0 send(C, 1) Level: tainted Process B Value: 0 send(B, 0) wait(1000) Process C Level: tainted if Value == 0: # secret is 0 Value: 0 else: # secret is 1 Level: untainted � 30

  29. Thanks! https://nickel.unsat.systems � 31

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend