FAILED: patch "[PATCH] nsfs: tighten permission checks for handle opening" failed to apply to 6.18-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 6.18-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y
git checkout FETCH_HEAD
git cherry-pick -x d2324a9317f00013facb0ba00b00440e19d2af5e
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026031728-canteen-ramp-ec25@gregkh' --subject-prefix 'PATCH 6.18.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From d2324a9317f00013facb0ba00b00440e19d2af5e Mon Sep 17 00:00:00 2001
From: Christian Brauner <[email protected]>
Date: Thu, 26 Feb 2026 14:50:10 +0100
Subject: [PATCH] nsfs: tighten permission checks for handle opening
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.
fs/nsfs.c +1 -1
@@ -627,7 +627,7 @@ static struct dentry *nsfs_fh_to_dentry(struct super_block *sb, struct fid *fh,return ERR_PTR (-EOPNOTSUPP ); } -if (owning_ns && !ns_capable (owning_ns,CAP_SYS_ADMIN )) { +if (owning_ns && !may_see_all_namespaces ()) { ns->ops->put (ns);return ERR_PTR (-EPERM ); }