]> git.ipfire.org Git - thirdparty/linux.git/commit
nstree: tighten permission checks for listing
authorChristian Brauner <brauner@kernel.org>
Thu, 26 Feb 2026 13:50:11 +0000 (14:50 +0100)
committerChristian Brauner <brauner@kernel.org>
Fri, 27 Feb 2026 21:00:11 +0000 (22:00 +0100)
commit8d76afe84fa2babf604b3c173730d4d2b067e361
treede4b8de3eeb9fce3ca5fec4171e5960754f90fdd
parentd2324a9317f00013facb0ba00b00440e19d2af5e
nstree: tighten permission checks for listing

Even privileged services should not necessarily be able to see other
privileged service's namespaces so they can't leak information to each
other. Use may_see_all_namespaces() helper that centralizes this policy
until the nstree adapts.

Link: https://patch.msgid.link/20260226-work-visibility-fixes-v1-3-d2c2853313bd@kernel.org
Fixes: 76b6f5dfb3fd ("nstree: add listns()")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Cc: stable@kernel.org # v6.19+
Signed-off-by: Christian Brauner <brauner@kernel.org>
kernel/nstree.c