News for hackers. Stuff that matters.
Re:Ask HN: What’s the most outrageous belief you’re confiden... by mikewarot on Wednesday December 29, 2021 @10:41PM (#29733295)
Capability Based Security is the only way out of the current tarpit of insecurity that we find ourselves in.

Unix, and everything modeled on it assumes competent users running applications they wrote for their own use. Anything that follows this model can't ever be made secure without rendering it useless well before then.

Capability Based OSs can be just as easy to use as Unix, except for the core assumption that code is to be trusted. When I say capabilities, I mean fine grained ones, like access to a file, which could then even be filtered down to access to part of a file, or read-only, etc.. then passed on to other tasks that require it. It makes permission composable, like being able to make $16.23 from exact change, instead of handing your wallet to the cashier and hoping for the best.

Until Capability Based Security becomes the norm, no nodes on the internet are safe, and it will always be an excuse to clamp down on freedoms. If we are to have freedom, we have to migrate to Capability Based Systems, and then continue on to win the war for general purpose computation, which most people don't even realize is already in play.

If you're old enough, remember shareware and dual floppy drive PCs? You could try out anything, and not worry a bit, because you didn't risk everything to the code you picked up for $2 on a shareware disk, you could always return to a known state. Capability Based Security makes that possible, even with mobile code on the internet.

Re:Ask HN: What’s the most outrageous belief you’re confiden... by errcorrectcode on Thursday December 30, 2021 @09:45AM (#29737089)
Things were worse before. Real-mode DOS programs relied on the honor system of software developers. Windows 3.x leaked resources if software developers didn't explicitly release them. Any program could read and write memory and storage wherever it pleased, for the most part.

The reasons we're "stuck" are multifaceted: sheer volume of code, unsafe languages, monolithic kernels, poor UX of security features, and inadequate automated testing (especially of kernel code).

seL4 solves the message-passing performance problem of microkernel designs and offers strict capabilities. One major gotcha in most microkernel designs is the need for multi-process side-effect locks, transactions, and rollbacks for mutating hardware state coherently.

MINIX 3 made some progress by implementing a NetBSD userland.

PS: It's a shame USB didn't include a write-protect tab by default.

Re:Ask HN: What’s the most outrageous belief you’re confiden... by mikewarot on Thursday December 30, 2021 @02:17PM (#29740272)
MS-DOS wasn't much more than a program loader, it wasn't supposed to protect anything. After your program did its worst, the OS was write protected, and the only thing you could mess up would be any floppy disks that weren't write protected. It was trivial to reset to a known good state.

It was easy to quantify your risk, as it only had write capabilities to the floppy disks without write-protect tabs.

That is what made it possible to just try anything, and not worry about it.

Re:Ask HN: What’s the most outrageous belief you’re confiden... by dragonwriter on Thursday December 30, 2021 @04:23PM (#29741608)
> MS-DOS wasn't much more than a program loader, it wasn't supposed to protect anything. After your program did its worst, the OS was write protected, and the only thing you could mess up would be any floppy disks that weren't write protected.

This is obviously only true of MS-DOS on purely floppy-based systems.

Re:Ask HN: What’s the most outrageous belief you’re confiden... by mikewarot on Thursday December 30, 2021 @10:12PM (#29744450)
>This is obviously only true of MS-DOS on purely floppy-based systems.

Years ago, it really saddened me to realize that a Dual Floppy IBM PC running MS-DOS was actually the high water mark of secure general purpose computing for the masses.

Re:Ask HN: What’s the most outrageous belief you’re confiden... by SpelingBeeChamp on Thursday December 30, 2021 @03:03AM (#29734707)
Sounds similar to what Apple has done with application privacy settings.
Re:Ask HN: What’s the most outrageous belief you’re confiden... by dllthomas on Thursday December 30, 2021 @01:13PM (#29739430)
"Application ... settings" is (probably?) still ambient authority - the application has the permission to do XYZ so all parts of the application have permission to do XYZ, and it might be possible to confuse a part of the program that isn't supposed to XYZ into doing so.

Capabilities is about associating the permission to do a thing with the handle you'd do it through; unrelated parts of the program don't know how to talk about the thing so can't do it.

Re:Ask HN: What’s the most outrageous belief you’re confiden... by mikewarot on Thursday December 30, 2021 @09:25AM (#29736912)
I can't stress enough how different it can be. Instead of letting programs pick files at random after a dialog box, you have the system return a handle (capability) and enforce the choice. As far as the user is concerned, it works the same.
Re:Ask HN: What’s the most outrageous belief you’re confiden... by autarchprinceps on Thursday December 30, 2021 @07:59AM (#29736342)
I agree. Especially the macOS version generally prompts you for permission to access the screen, or certain folders/file groups. Though I don't get why some things get a yes/no, and for others it tells you to look it up in the security settings yourself, if you want to enable it. But that's more of a usability complaint. Then again we are so accustomed to just say yes, if a dialog asks us, whether we want to do something, I doubt most people would secure their device much better, if this became the norm. Heck, did you see the recent Linus Tech Tips video on using Linux as a mainline system, including for gaming. Linus deinstalled his entire UI, despite the fact that he had to literally type "I am sure that is what I want to do, although core system elements are being uninstalled" in order to approve it, and he is a fucking techy, leagues above your average user. I think for many people using a device that is more restrictive and doesn't allow everything is sadly necessary.
Re:Ask HN: What’s the most outrageous belief you’re confiden... by danaris on Thursday December 30, 2021 @10:11AM (#29737303)
> Though I don't get why some things get a yes/no, and for others it tells you to look it up in the security settings yourself, if you want to enable it

I think the former is the system dialog that comes up when the app officially requests the capability, while the latter is an app dialog—which they pop up instead of officially requesting the capability because if you say "no", that setting is saved, and the app can't officially ask again.

This way, they get to bug you every single time until you say "yes".

Re:Ask HN: What’s the most outrageous belief you’re confiden... by autarchprinceps on Monday January 03, 2022 @04:22AM (#29778867)
Hmm, it is designed exactly the same in all applications independent from manufacturer, so I somehow doubt it.

I have seen applications that also say it in their own UI, but Apple does display a specific dialog telling you that it was blocked, and if you want to enable it, you need to go to the settings and do so.

And it is even document on official Apple pages, so I doubt this is application code: https://developer.apple.com/library/archive/documentation/La...

From https://developer.apple.com/library/archive/documentation/La...

Re:Ask HN: What’s the most outrageous belief you’re confiden... by szszrk on Thursday December 30, 2021 @04:37AM (#29735170)
I don't know Apple products, but doesn't it sound a lot of like selinux? You explicitly tell the OS which resources can an app use and confine it in that.
Re:Ask HN: What’s the most outrageous belief you’re confiden... by dllthomas on Thursday December 30, 2021 @12:58PM (#29739206)
Re:Ask HN: What’s the most outrageous belief you’re confiden... by BerislavLopac on Thursday December 30, 2021 @04:37AM (#29735167)
So basically Bitfrost [0]?

[0] https://en.wikipedia.org/wiki/Bitfrost

Re:Ask HN: What’s the most outrageous belief you’re confiden... by mikewarot on Thursday December 30, 2021 @09:23AM (#29736898)
No, nothing like that at all. Imagine opening a file in a text editor.... the editor pops up a dialog asking you what file to open... and then grabs the file you indicated. It can do this because it has access to everything, so if it gets confused, or subverted, there's zero guarantee that it will do the right thing.

Imagine instead, your text editor called the system to get a capability, which then opened the same dialog, and gave a capability (like a file handle) to the text editor for its use. If it got confused, or subverted, the only thing it could mess up would be that one file.

Re:Ask HN: What’s the most outrageous belief you’re confiden... by falcolas on Thursday December 30, 2021 @10:15AM (#29737354)
Here’s an outrageous belief to complement this:

It will never happen. We’re simply not smart enough to create such a system that won’t be too much of an inconvenience for developers and users.

And the underlying cause is that “too much of an inconvenience” is any inconvenience at all.

Re:Ask HN: What’s the most outrageous belief you’re confiden... by dllthomas on Wednesday January 05, 2022 @05:58PM (#29816386)
I'm not convinced that it's actually less convenient than the status quo.