4 ms·
I don't really agree with this separation of privileges between root and kernel... (and by extension, lockdown mode) It seems to add a lot of complexity, and o
by londons_explore 6y ago
I don't really agree with this separation of privileges between root and kernel... (and by extension, lockdown mode)
It seems to add a lot of complexity, and offers no real world usecases.
If you want a secure system, don't run untrusted code as root! If your evil code only runs as a regular user, there is no issue trusting hibernation, because a non-root user will never be able to touch the hibernation image. Even if you assume the non-root user has physical access to the disk between boots, you can use disk encryption and TPM to ensure they can't mess with it.
- seniorivn 6y agothere is a of privilege association
- seniorivn 6y ago*a risk
- pilif 6y ago> If you want a secure system, don't run untrusted code as root! This pretty much means: don't run any untrusted code as any user (because privilege escalation) and that also pretty much includes visiting any web page. Security flaws exist and they are in-fact being abused. Not having to completely wipe a machine (if that even helps. Who knows what kind of tricks malware elevating its privileges to root can pull) after every day of web browsing is a nice convenience to have.
- NullPrefix 6y ago>This pretty much means: don't run any untrusted code as any user Wasn't this a recommendation from Intel when spectre/meltdown happened?
- Nullabillity 6y agoMalware running as root doesn't need kernel access to wreak plenty of havoc. Hell, your own user has access to almost all of the data that both you and the malware author are likely to care about.
- user-the-name 6y agoYes, the security model based around users in Unix is very outdated at this point. It doesn't really represent the kind of threats a modern computer faces.
- gruez 6y agoRelevant xkcd: https://xkcd.com/1200/ https://xkcd.com/1200/
- pilif 6y agoMalware running as a normal user can't put itself in a position where it's hidden from software running as root. Preserving system integrity was my point. The patch in the original article is about preserving system integrity in the face of a compromised root account and the only way of doing that is by limiting the capabilities of the root user. It adds one more and hopefully final level of defense in order to guarantee system integrity.
- yjftsjthsd-h 6y ago> because privilege escalation If we're assuming a vulnerable kernel, why not assume vulnerable firmware and throw the whole thing out?
- zozbot234 6y ago> It seems to add a lot of complexity, and offers no real world usecases. The use case for kernel lockdown has to do with being a good player in the Secure Boot ecosystem so that kernel images can be signed by default. If a malicious user can boot the kernel in secure boot mode and then get it to execute code in ring0 that chainloads a different OS while staying in secure boot mode and with the user being none the wiser, this subverts the ecosystem since the other OS will lose its pre-existing guarantees about system state. Note that the EFI "shim" executable does allow for chainloading an OS in secure mode but only after prompting the user to that effect.
- lima 6y agoIsn't that kind of a lost fight? So many signed bootloaders and no way to revoke in-the-wild.
- londons_explore 6y agoJust make the linux kernel modify the TPM state in some way on startup? Then any chainloaded OS would be able to see it isn't running on bare metal.
- est31 6y agoDue to namespacing, anybody can appear as root to the kernel, at least if unprivileged namespacing is allowed. So you kinda need the separation.
- londons_explore 6y agoIs this true? While you can appear root to other userspace apps, I don't think any amount of namespacing will let you get capabilities to load kernel drivers...
- mschuster91 6y ago> It seems to add a lot of complexity, and offers no real world usecases. As sad as it is, there is one use case: DRM and other forms of device integrity attestations.
- userbinator 6y agoExactly. Its main goal is to appease the authoritarian corporatocracy. This is one of the biggest signs that open source does not mean freedom.
- bayindirh 6y ago> It seems to add a lot of complexity, and offers no real world usecases. I'd love to be able to lock my system in a trusted state and try some dangerous things, having another level of isolation between kernel and root, as long as I have the keys to revert/modify the state. This irks the old timers (incl. me) as "It's already secure when process doesn't have root, eh?", but containers, cloud, virtualization and other stuff makes these further enhancements useful. I'm not adding high security installations to this set of scenarios. Linux is already pretty secure by most counts, but more security won't hurt IMHO.
- sildur 6y ago> I'd love to be able to lock my system in a trusted state and try some dangerous things, having another level of isolation between kernel and root, as long as I have the keys to revert/modify the state. You should take a look to QubesOS. It gives me peace of mind.
- TheRealPomax 6y agoAnd how do you propose to effect that? Because can you trust apt? Not really, but we just do. Can you trust that you're talking to the DNS server you think you're talking to? Again, not really, but we do. Can you trust that your admin won't violate their contract, and the law, for personal gain (or to prevent personal loss)? Still no, but again we typically do anyway. The real world includes things like large infrastructure, hospitals, defence, etc. Separating root from kernel in those settings adds complexity because just having "be root" be your access pass to the everything has already been proven to not be good enough time and time again.
- Jasper_ 6y agosetuid breaks this thinking. For nearly 15 years, "beep" on Debian could be exploited to get root. "Don't write unexploitable code that runs as root" is not a solid defense mechanism for today's world.