You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Norm said he was going to write up the following code, but I can't
find where he did.
I know there is a thorough breakdown of Stiegler's ocaml version here
That links to most sealer/unsealer pair related links on Norm's site (directly or indirectly).
The exceptions being WeakMap implementations, and a cooperating conspirators attack Attack 2.
Hence, once the invocation of the box returns, the slot should contain c if the box was sealed by the corresponding sealer. If the slot contains a capability, then the unsealer takes a copy of it and clears the slot before returning the capability.
Stiegler's ocaml code cleared the 'slot' as well. But I have never found a published reference for the attack, perhaps folklore.
I think it's worth considering WeakMap and other variants or primitives that produce their effect on seal rather than unseal. (e.g. insertion into the WeakMap) For reasons of having a thread safe unseal and less suprising implementation with regards to the unexpected effects discussed in the attack above, where failure to clear the slot essentially turns the unsealer itself into a one-way read-only communications channel when given a () -> () lambda for a box.
Edit/Caveat: not really familiar with WeakMap sealer/unsealers, I've mostly used typed opaque value mechanism where the unsealer is just the identity function to the unopaque type, the naive versions of which don't support revocation but are pure.
The text was updated successfully, but these errors were encountered:
Hi,
I know there is a thorough breakdown of Stiegler's ocaml version here
That links to most sealer/unsealer pair related links on Norm's site (directly or indirectly).
The exceptions being WeakMap implementations, and a cooperating conspirators attack Attack 2.
Unfortunately this is a version of the buggy sealer which suffers from Attack1
Edit: Norm's updated code is indirectly linked above,
but I don't think there is any harm in just including it inline:
Seal
I'm not sure of where this attack originates from, Toby Murray's description here Analysing Object-Capability Security (Murray 2007) describes the solution:
Stiegler's ocaml code cleared the 'slot' as well. But I have never found a published reference for the attack, perhaps folklore.
Toby's slides have diagrams of the process.
I think it's worth considering WeakMap and other variants or primitives that produce their effect on seal rather than unseal. (e.g. insertion into the WeakMap) For reasons of having a thread safe unseal and less suprising implementation with regards to the unexpected effects discussed in the attack above, where failure to clear the slot essentially turns the unsealer itself into a one-way read-only communications channel when given a
() -> ()
lambda for a box.Edit/Caveat: not really familiar with WeakMap sealer/unsealers, I've mostly used typed opaque value mechanism where the unsealer is just the identity function to the unopaque type, the naive versions of which don't support revocation but are pure.
The text was updated successfully, but these errors were encountered: