All Your IFCException Are Belong To Us
Cătălin Hrițcu
(joint work with Michael Greenberg, Ben Karel, Benjamin Pierce, Greg Morrisett, and more)
2012-11-05 -- WG 2.8 meeting in Annapolis
All Your IFCException Are Belong To Us C t lin Hri cu (joint work - - PowerPoint PPT Presentation
All Your IFCException Are Belong To Us C t lin Hri cu (joint work with Michael Greenberg, Ben Karel, Benjamin Pierce, Greg Morrisett, and more) 2012-11-05 -- WG 2.8 meeting in Annapolis Information Flow Control [Fenton, 1974] Static
2012-11-05 -- WG 2.8 meeting in Annapolis
Information Flow Control Static Dynamic Sound Coarse-grained
[Krohn & Tromer, 2009] [Sabelfeld & Russo, 2009] [Austin & Flanagan, 2009] OSes: Asbestos (2005), Flume, HiStar [Fenton, 1974] JavaScript
2
Taint Tracking Fine-grained
3
4
*There are 2 very recent (partial) exceptions: [Stefan et al., 2012] and [Hedin & Sabelfeld, 2012]
5
let cin = chan low; let cout = chan low; fun process_max x y = if x <= y then y else x fun rec max_server_loop () = let (x,y) = recv cin in let res = process_max x y in send cout res; max_server_loop () let attacker = send cin (3, 2@high)@low let client = send cin (3, 5)@low; recv cout x=3@low y=2@high 3@low <= 2@high = false@high pc=high result is high res=3@high max_server gets killed because of IFC violation!? = 5 let bclient = send cin (3, 5)@high bclient gets killed
channels only do top- level label checks
6
let cin = chan low; let cout = chan low; fun process_max (x,y) = if x <= y then y else x fun rec max_server_loop' () = try send cout (process_max (recv cin)) catch x => log x; max_server_loop' ()
7
Sound Fine- Grained Dynamic IFC
8
Sound Fine- Grained Dynamic IFC
9
label channel
enforce that labels don’t depend on secrets labels must be hidden labels can be observed allow labels to depend on secrets
try true catch IFCException => false
10
encode h into label if branch − assignment works else branch − IFCException (if h then ()@high else ()@top ); href := let href = ref high () in .......
pc automatically restored to low once the if branches merged so false/true is low
– pc=low if h then ()@high else ()@top pc=high
– pc=low top[if h then ()@high else ()@top] pc=low
11
labels IFCException labelOf
– high[if true then throw Ex] => “(Inr Ex)@high” – high[if false then throw Ex] => “(Inr ())@high”
12
throw)
NaV)
13
– NaV@low + 42@high => NaV@high
– (fun x => 42) NaV => 42 or => NaV – Cons NaV Nil => Cons NaV Nil or => NaV – (r := NaV,r=7) => ((),r=NaV) or => (NaV,r=7)
14
15
Without these debugging aids NaVs are compiler writer’s wet dream (Greg Morrisett)
NaV, and λ[ ] throw (termination-insensitive)
NaV even with all debugging aids
16
throw
NaV
NaV and λ[ ] throw)
17
18