Re: [PATCH] userns: Let LSMs deny the CAP_SETFCAP snapshot for mapping uid 0

From: Christian Brauner

Date: Wed Nov 11 2026 - 09:23:33 EST


On Tue, 10 Nov 2026 15:42:04 +0100, Mickaël Salaün wrote:
> Commit db2e718a4798 ("capabilities: require CAP_SETFCAP to map uid 0")
> records in parent_could_setfcap whether the creator of a user namespace
> had CAP_SETFCAP, because a creator writing its own uid_map only has
> capabilities in the new namespace. The snapshot uses cap_raised(), so a
> task whose LSM policy denies CAP_SETFCAP can still map uid 0 in a
> namespace it creates.
>
> [...]

Applied to the namespace-7.5.misc branch of the vfs/vfs.git tree.
Patches in the namespace-7.5.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: namespace-7.5.misc

[1/1] userns: Let LSMs deny the CAP_SETFCAP snapshot for mapping uid 0
https://git.kernel.org/vfs/vfs/c/2397c70f7645