From: Christian Brauner Date: Mon, 10 Aug 2026 07:36:06 +0000 (+0200) Subject: Merge patch series "fs: don't warn when a mount is completed from another user namespace" X-Git-Tag: v7.2~22^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86bcfe2e37cee93bb495ecd3238116ffd21183e9;p=thirdparty%2Fkernel%2Flinux.git Merge patch series "fs: don't warn when a mount is completed from another user namespace" Christian Brauner says: fsopen() records the caller's user namespace in fc->user_ns and hands back an ordinary file descriptor. The task that calls fsconfig(CMD_CREATE) doesn't have to be the one that created the context, and mount_capable() lets it through as long as the caller has CAP_SYS_ADMIN over fc->user_ns, which anyone in an ancestor namespace does. So fc->user_ns != current_user_ns() is something an unprivileged user can arrange. Both overlayfs and binfmt_misc WARN_ON() that. They're plain WARN_ON()s, so it can be done in a loop to taint the kernel and flood the log, and it panics a machine booted with panic_on_warn. Keep refusing the mount, just stop warning about it. Overlayfs already spells the same check as a plain error return in ovl_parse_param() for Opt_override_creds. And add a selftest for both cases. * patches from https://patch.msgid.link/20260802-work-fill_super-warn-v1-0-4e987911a39a@kernel.org: selftests/filesystems: test completing a context from another user namespace binfmt_misc: don't warn when the mount is completed from another user namespace ovl: don't warn when the mount is completed from another user namespace Link: https://patch.msgid.link/20260802-work-fill_super-warn-v1-0-4e987911a39a@kernel.org Signed-off-by: Christian Brauner (Amutable) --- 86bcfe2e37cee93bb495ecd3238116ffd21183e9