Re: [PATCH v2 1/4] userns: introduce capability bounding set for user namespaces

From: Christian Brauner

Date: Mon Nov 30 2026 - 08:39:54 EST


On Fri, Nov 20, 2026 at 09:09:47AM -0800, Andy Lutomirski wrote:
> Define a whole new set of privilege bits. As a
> poorly-painted-bikeshed option, I'll call them eprivs (for exposure
> privileges - it's a crappy name but at least it's pronounceable).
> EPRIV_NET_ADMIN: may use traditional CAP_NET_ADMIN abilities (all
> CAP_NET_ADMIN checks will also check EPRIV_NET_ADMIN)
> EPRIV_FSOPEN_VIRT: may fsconfig, fsopen, etc a virtual fs like fuse or
> tmpfs or overlayfs.
> available, and that my epriv proposal captures much of this but the
> cap_userns proposal may be too coarse-grained.

I'm rather skeptical about this. It means yet another set of completely
new bits that will have to be checked all over the tree. Some poor idiot
(aka me) then has to keep "may use netlink at all" or "may clone a mount
tree" meaning the same thing while the code behind it gets completely
rewritten. So especially for the VFS part I'm very very skeptical. I
would absolutely consider splitting various mount operations off from
CAP_SYS_ADMIN into dedicated capabilities and I'd have a pretty good
idea of what they would need to be initially. But new "attack bits"
don't really do it for me.

I don't think that plumbing a bunch of separate bits on top is going a
good direction. I remain confused why we would go down that route
instead of just breaking CAP_* bits into finer pieces and massaging the
codepaths accordingly.

New bits don't magically make the actual underlying problem go away.

But I really really want to merge CLONE_NO_NNP. But please call it
CLONE_CLEAR_NNP from the other thread. I merged CLONE_NNP for v7.1 and
it sets no_new_privs on the child, so CLONE_NO_NNP right next to it is
going to be confusing.