Capability Myths Demolished (2003)
erights.org
erights.org
"Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud" Arnar Birgisson, Joe Gibbs Politz, Úlfar Erlingsson, Ankur Taly, Michael Vrable, Mark Lentczner ; Network and Distributed System Security Symposium, Internet Society (2014)
https://research.google/pubs/pub41892/
"Google's Macaroons in Five Minutes or Less" https://blog.bren2010.io/2014/12/04/macaroons.html
A Javascript implementation: https://github.com/nitram509/macaroons.js
> largely dismissed by computer security reseachers and practitioners due to a history of misunderstandings
seems incorrect now as virtually all web auth systems are capability based
And thanks! There's a story behind why this paper became so influential.
The paper was submitted to Usenix security and famously rejected https://web.archive.org/web/20160730083134/http://www.eros-o...
Although we don't know who the specific reviewers were, they were from the Usenix Security program committee, and so from the elite of the field. This rejection captures perfectly the tone of dismissal common in academia at the time. The common wisdom was that capabilities were a failed and unworkable idea that we need not bother further discussing. As you can see from the date on that email, when we got this rejection, we immediately posted it publicly.
My sense is that the paper together with this referee rejection, posted and discussed publicly, caused the initial influence. The embarrassment from that rejection was not on the authors. Within two years, many still thought capabilities were wrong. But the sneer was gone. Arguments could be heard. I dare say it marks the beginning of the capability revival in academia.
For someone who hadn't really read about this before, I found this[1] article, linked above, to be a really nice introduction.
[1]: http://habitatchronicles.com/2017/05/what-are-capabilities/
For example, access to a file. Lets say you have a capability that grants file access. One can open the file and read and write to it when you have the capability. The file descriptor can be made to refuse access when the capability is revoked -- cutting off reads and writes, you'll really need a new error code for this as no others really explain what happened. However, this isn't enough, on UNIX systems that support mmap() your "access" capability now needs to be intertwined into the paging system, every page or mapping now has to be capability marked and checked. Paging is asynchronous, what happens when the capability is revoked? Is there now a hole in the address space of the process? How on earth do you communicate that to a process that might have pointer references into the mapped data? Which software programming language could support this? What happens when the process if forked? Does this duplicate the capability or not?
Similar problems exist with shared memory and semaphores -- revoking an associated capability could deadlock a system.
In my opinion, in order to make a system useable, a programmer or user must be able to build a mental model of how things work. Capabilities and resources suddenly disappearing is a challenging environment to work in.
Just look at all the issues / problems that plague pluggable devices.
I have read the paper, and the rejection notes you linked to, and I can't evaluate them (lack of time + lack of experience in this field) but they don't come across as snooty dismissals. Feels more like guys on all sides trying their best.
Yes, I am one of the authors of the paper.
> but they don't come across as snooty dismissals. Feels more like guys on all sides trying their best.
Rereading it now, it's mixed. I definitely have a milder reaction than I did at the time. Thanks for challenging me on this.
In an OS like KeyKOS, how does the OS protect against privilege escalation using side-channel attacks similar to how encryption keys are extracted via hardware side-channels?
Side channel attacks are AIUI about information leakage. They extract info on the state, not modify state[0]. I don't think privilege escalation is really related because that needs to modify state you should not have access to[1].
Capabilities at the OS and software level are software enforced, which is built on assumptions about the security (correctness guarantees) of the hardware. If the hardware leaks, the software is vulnerable unless/until patched to try to paper over the leaky cracks in the hardware.
Again, AIUI.
[0] Though such extracted data might be a security token that can subsequently be used to actively attack, such as logging in via someone's newly pwned admin password.
[1] I suppose rowhammer is exactly that, though, an attack that intentionally leads to a handy state change for the attacker.
But in a capability-based OS, privilege is all about the keys you hold, no? So assuming a malicious process can copy keys from other processes, can the OS detect and prevent the malicious process from using the key?
I tried reading up on KeyKOS[1] and there was very little info on what exactly a key is and how it is verified by the OS, at least that I could see.
In that case the hardware is effectively broken and all that's left is attempted software mitigation. Which may/may not work, but surely will cost performance. And extra complexity. And consequential possible bugs.
From memory a key can be represented as a random 64-bit integer taken from a sparse set. IOW you'd have bugger all chance of guessing another currently used 64-bit int, and if you tried and guessed wrong the OS, which would keep a list of caps allocated to each process) would say when you tried to use it "and where exactly did this come from, eh?" and kill you. But that's from memory and guesswork.
HTH and don't trust what I say too much!
Indirection's costs haven't gotten cheaper in well over a decade.
Of course, half the time those indirections will probably be remote to the server you're already waiting on...
E.g. you could do fancy things like grant someone access to a folder, and also to all subdirectories whose name starts with "collaboration_".
And you can build any kind of permission system with it, if you don't like the power or complexity.
Being Turing-incomplete is a valuable feature.
We're not banning regular applications either because they are undecidable.
Also, we could change Turing completeness into something less powerful, for instance programs without loops.
This type of attack exists even without Turing-complete config but just with references: https://en.wikipedia.org/wiki/Billion_laughs_attack
> Also, we could change Turing completeness into something less powerful, for instance programs without loops.
Yes, this is a strategy. For example BPF does not support loops.