Kernel News
Closing Security Holes in User Namespaces
Serge E. Hallyn posted a patch to add some cool magic to file capabilities in namespaces. Linux uses namespaces to corral resources into virtual systems, essentially allowing multiple whole Linux operating systems to run on top of a single host. The problem was that a hostile user could create their own namespace, assign themselves the identity of a root user, and then use their higher privilege level to change the extended attributes (xattrs) of a file to give improper access to regular users.
With Serge's patch, whenever the root user of a given namespace attempted to alter security xattrs, the kernel would sneak past the root identity and rely on the credentials of the original user instead. If the original user lacked the necessary credentials, the kernel would use an alternative security xattr that would allow the process to complete its work, without actually giving the targeted files any security holes.
Mimi Zohar liked the whole sneaky process, especially the part where userspace didn't need to keep track of whether it was in or out of a namespace. That's one of the holy grails of virtualization – to make the virtual system seem identical to a standard instance of Linux running directly on its own hardware. But, because of various complex security considerations, it's very difficult to provide absolutely every feature of regular Linux in a virtualized environment. Serge's patch was an attempt to address one instance of that type of issue.
Meanwhile, Eric W. Biederman had some criticisms of Serge's whole concept. He didn't like that Serge's code would allow an equivalent, though less dangerous, xattr to be written instead of the more dangerous one desired by the hostile attacker. He felt that these two xattrs were essentially identical but ran the risk of getting out of sync. Eric preferred to just allow the user to write the xattr, but record the fact that it was the user doing it and not root. This way, he said, the security would not be compromised.
Mimi asked if Eric's suggestion would allow multiple instances of the same xattr, and Serge explained, "No, but we don't actually want that anyway. The current behavior for security capability is that it works in all user namespaces. So, we want to continue the behavior that if root in the init_user_ns sets a capability, that [it] works in all namespaces. Allowing other namespaces to set the capability would only be confusing."
Zack Brown
The Linux kernel mailing list comprises the core of Linux development activities. Traffic volumes are immense, often reaching 10,000 messages in a week, and keeping up to date with the entire scope of development is a virtually impossible task for one person. One of the few brave souls to take on this task is Zack Brown.
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.