3 ms·
> Really? I would have assumed that letting anyone send capabilities to anyone without going through the kernel was a highway towards privilege escalation. "Un
by naasking 10y ago
> Really? I would have assumed that letting anyone send capabilities to anyone without going through the kernel was a highway towards privilege escalation.
"Unrestricted" in my post doesn't mean "you can send to anyone", it means "no restrictions on passing capabilities beyond that defined by the capability model".
The capability security model requires that you can only send capabilities via your other capabilities. So if you have a capability to another process, then you can send any of your other capabilities to that process. The Redox design appears to violate this.
The capability model is actually simple and surprisingly common. Take any memory-safe object-oriented language, and remove static mutable state and the file system and network APIs (all sources of "ambient authority"). An object reference is now a capability. Passing an object reference via method parameters is a capability send, and you can only pass around references you actually have, and only to objects to which you have references. That's capability security.
You can look at any context and see precisely what side-effects can occur simply by analyzing the set of object references available in that context. It's bad design to define functions that take a huge number of parameters, but it's also bad security. Capability security aligns maintainability concerns with security concerns thus yielding POLA.
Edit: as for documentation, I'm not sure if you want OS documentation, or general capability documentation. The seL4 and EROS papers are good for capabilities in operating systems, the E and Joe-E programming languages are good references for capabilities in general.
- Yoric 10y agoI am actually pretty familiar with (some instances of) the capability model, in particular process algebra-style capabilities, which pretty much don't limit sending capabilities, but also don't need to deal with Unix-style `fork`, for instance. I was just wondering if you had specific problems in mind. In this case, how would you modify the design? Getting rid of `Kind`, I assume? If so, how would you enable/disable passing capabilities? By having a meta-capability "I can pass capability foo"? That's pretty much how I would do it in a process algebra, but that doesn't look very usable in practice.
- naasking 10y ago> If so, how would you enable/disable passing capabilities? By having a meta-capability "I can pass capability foo"? I would first question why you think you need to disable capability passing at all, which was the main thrust of my post [1]. What specific problem are you trying to solve by restricting capability passing? Perhaps Unix-style 'fork' has some undesirable semantics, but I don't see how restricting capability delegation would solve them. POSIX sandboxes using capabilities have been done a few times, originally KeyKOS and then EROS. Perhaps the most accessible introduction for those coming from a UNIX introduction would be Capsicum [2]. [1] Yes, "kind" classifies capabilities into those that can be passed around without restriction, and those that can't, so I'm questioning the utility of that [2] https://www.usenix.org/legacy/event/sec10/tech/full_papers/Watson.pdf https://www.usenix.org/legacy/event/sec10/tech/full_papers/W...
- Yoric 10y ago> I would first question why you think you need to disable capability passing at all, which was the main thrust of my post [1]. What specific problem are you trying to solve by restricting capability passing? Right now, my specific problems #1 (resp. #2) is understanding what you (resp ticki) have in mind :) But I can also think of problems such as: 1/ limiting privilege escalation; 2/ somehow transitively revoking privileges that have been obtained through a compromised process. Not sure if `Kind` has any effect on either, but I'll spend a few days thinking about these issues. I'd be happy to chat with you if you're interested (I'm Yoric on irc.mozilla.org).
- naasking 10y agoRevocation is a solved problem for pure capabilities [1,2]. Privilege escalation is typically not so important in capability systems because processes run with least privileges. There is a pattern whereby authority can be increased if you're granted a special type of capability -- the operation is called "rights amplification" in capability parlance, but these capabilities are closely held by the trusted base. Finally, the reason restricting delegation doesn't generally work is that a process can just proxy access to the undelegable capability, which means you haven't actually attentuated authority in any meaningful way. At best, you've merely reduced the bandwidth, so overall performance suffers, and you've also sacrificed compositional reasoning. Anyway, that's why I initially asked for any design documents for Redox's capability system, so I encourage ticki and any others working on this to write a rough draft of the ideas. I know plenty of capability people who would happily provide feedback. [1] https://www.cs.ucsb.edu/~chris/teaching/cs290/doc/eros-sosp99.pdf https://www.cs.ucsb.edu/~chris/teaching/cs290/doc/eros-sosp9... [2] https://sel4.systems/Info/Docs/seL4-manual-2.0.0.pdf https://sel4.systems/Info/Docs/seL4-manual-2.0.0.pdf