by still_grokking · 3y ago · 0 comments
There is no capability security on the OS level.
Otherwise Android wouldn't have a malware issue and iPhones wouldn't need to be locked up against third party apps.
>Otherwise Android wouldn't have a malware issue and iPhones wouldn't need to be locked up against third party apps.
Android malware is not as bad as what is possible with Windows malware. Over the years Google has been cracking down and working to remove permissions that apps can use without the user knowing. Unless the app has an exploit for the operating system it can't do much harm to you. iPhones have allowed for third party apps since the very first iphone a decade and a half ago.
Generally speaking, capabilities are not asked for; that would be a permission.
Capabilities can be used to implement permissions, but that's not what is usually meant by 'capability-based security'. Capabilities are essentially just inputs; a GPS-reading capability would be anything we can read GPS data from (e.g. a callback; or a pseudo-file handle; etc.).
Security is enforced by choosing who is given a capability (like a URL); we can get extra security by minting new capabilities, and revoking those which should no longer have access.
Permissions are not required to "do" things; they are enforced elsewhere, to determine whether that thing should succeed or fail. For example, giving out URLs to search engines, then trying to have the server reject requests that we don't want (AKA 'closing the barn door after the horse has bolted')
No, that are two fundamentally different concepts.
A capability is something that needs to be hold and passed to every call. If you can't show the needed capability (because you don't own it, in the sense that you're holding a special kind of object in your hands) you can't preform an action. On the very basic level: You just can't call a function because it needs a parameter of capability type.
This is fundamental different to permissions. Permissions are checked by the called code. You don't need to "pass a permission" alongside the actual action you try to perform.
Please read up at least the Wikipedia page as you seem to have some severe misconception about this topic: https://en.wikipedia.org/wiki/Capability-based_security
That's not capability-based security: you have to do that whichever model is in use. The ocaps come in when you use dependency injection (aka "function call") everywhere to pass in rights to make use of resources. Neither Android nor iOS are meaningfully object-capability based.
No, that would be mandatory access control. Completely different concept.
That's completely wrong.
The whole point of capabilities is that they're unforgeable.
You can't mint a capability! You need to get it passed "form above". Nobody can create capabilities from thin air (not even the OS kernel).
seL4 is just the core of a micro kernel. The hard part would be to build an OS around that.
You know, the same way that you ask for code review before merging to prod.
I've liked Wikipedia on that topic already in this thread. Please take a look.
And for bystanders, here's the Wikipedia link: https://en.wikipedia.org/wiki/Capability-based_security
My reasoning was that it would be rude to link to myself, to a comment that showed up at this time just on the same screen as this one.
But I guess you're right. A link would not hurt, but make it more easy to discover the mentioned content.