News for hackers. Stuff that matters.
Re:Can You Really Trust That Permission Pop-Up on macOS? (CV... by nmgycombinator on Monday May 12, 2025 @08:25PM (#43968689)
As someone who's looked into the internals of macOS for a bit now, this is all incredibly fascinating. However, I am curious: do you think capabilities could be implemented like this at a really low level? Part of me thinks we have the security models we do in POSIX is because they're simple enough to represent in C code.

The capability systems you're mentioning sound cool, but they sound a lot more complex. And if that's true, and they aren't built with irreducible complexity, then it would be possible to work around it by just pulling out bits and pieces from the system and abusing them.

Re:Can You Really Trust That Permission Pop-Up on macOS? (CV... by ryukafalz on Monday May 12, 2025 @09:35PM (#43968982)
Capabilities themselves can certainly be implemented at a very low level; you might implement them as an array of capabilities associated with each process: https://en.wikipedia.org/wiki/C-list_%28computer_security%29

As that page points out, POSIX file descriptors are effectively c-lists. A capability operating system would use similar mechanisms to control access to resources other than just open files.

The other things GP mentioned (logging, interdiction, UIs for visibility/control, etc) are layers that you would implement on top of the lowest-level capability system.

Re:Can You Really Trust That Permission Pop-Up on macOS? (CV... by nmgycombinator on Monday May 12, 2025 @10:15PM (#43969152)
Oh nice! I'll take a look at these.
Re:Can You Really Trust That Permission Pop-Up on macOS? (CV... by FuriouslyAdrift on Tuesday May 13, 2025 @12:58PM (#43975083)
The Plessey 250 was a great one... https://en.wikipedia.org/wiki/Plessey_System_250
Re:Can You Really Trust That Permission Pop-Up on macOS? (CV... by ryukafalz on Tuesday May 13, 2025 @04:44PM (#43977497)
Ah, thanks for the reference! Yes, there are a lot of very old capability systems in computing history.

I've got a copy of Capability-Based Computer Systems on my shelf that I've been meaning to read for a while, and it covers the Plessey System 250: https://homes.cs.washington.edu/~levy/capabook/

Very much not a new concept! Though note that this book was published in 1984 and there have been several newer developments in the capability literature since then. (Revocation for example, which is mentioned as an issue in chapter 10 but has since been addressed with some capability design patterns.)

Re:Can You Really Trust That Permission Pop-Up on macOS? (CV... by josephg on Tuesday May 13, 2025 @01:00AM (#43969744)
SeL4 is a capability based operating system toolkit, entirely implemented in C. The core operating system is just a few thousand lines of code. Its even mathematically proven to be bug free - which is totally insane.

It even uses a capability to allocate (assign) memory. So you typically have a microservice (userland process) in charge of memory on the whole system. Other processes get heap memory allocated to them by asking that service for it. (Though typically you'll allocate large blocks, and divide it up using a normal allocator).

Re:Can You Really Trust That Permission Pop-Up on macOS? (CV... by nmgycombinator on Tuesday May 13, 2025 @03:09AM (#43970336)
I think Apple uses an L4 variant for their SEP co-processor, though I'm not sure if it's that specific one. Sounds like another OS I'll probably have to do a deep dive into at some point.
Re:Can You Really Trust That Permission Pop-Up on macOS? (CV... by SSLy on Tuesday May 13, 2025 @03:18AM (#43970394)
They also run L4 variants below and besides XNU, on same cores as the rest https://randomaugustine.medium.com/on-apple-exclaves-d683a2c...
Re:Can You Really Trust That Permission Pop-Up on macOS? (CV... by nmgycombinator on Tuesday May 13, 2025 @03:32AM (#43970457)
Ooh! Thanks for the links!
Re:Can You Really Trust That Permission Pop-Up on macOS? (CV... by saagarjha on Tuesday May 13, 2025 @05:23AM (#43971102)
Capability systems are often simpler. The issue is that a lot of Mac software expects POSIX so moving away from that would break a lot of things.