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.
News
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.