[GIT PULL for v7.2] vfs fixes
From: Christian Brauner
Date: Fri Aug 14 2026 - 09:06:32 EST
Hey Linus,
/* Summary */
This contains last fixes for the current development cycle:
- Don't warn when a mount is completed from another user namespace.
fsopen() records the caller's user namespace in fc->user_ns and hands
back an ordinary file descriptor. The task that calls
fsconfig(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. Overlayfs already
has the same check as a plain error return in ovl_parse_param(). Drop
the WARN_ON() and just refuse. Add selftests for both cases.
- Reject pid allocations through dead ancestor pid namespaces.
Require PIDNS_ADDING in every namespace that will receive the pid
before publishing any of them. That preserves the invariant that
free_pid() never decrements pid_allocated in a namespace whose
child_reaper is no longer live. The existing ENOMEM behavior is
unchanged.
/* Conflicts */
Merge conflicts with mainline
=============================
No known conflicts.
Merge conflicts with other trees
================================
No known conflicts.
The following changes since commit db2ddb87143519e20a95aa36c60b36107b736a58:
Linux 7.2-rc7 (2026-08-09 14:54:50 -0700)
are available in the Git repository at:
git@xxxxxxxxxxxxxxxxxxx:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.2-rc8.fixes
for you to fetch changes up to b64a9f67e082e04835ddd69d422a25168d69375b:
pid: reject allocations through dead ancestor pid namespaces (2026-08-12 12:56:30 +0200)
----------------------------------------------------------------
vfs-7.2-rc8.fixes
Please consider pulling these changes from the signed vfs-7.2-rc8.fixes tag.
Thanks!
Christian
----------------------------------------------------------------
Christian Brauner (4):
ovl: don't warn when the mount is completed from another user namespace
binfmt_misc: don't warn when the mount is completed from another user namespace
selftests/filesystems: test completing a context from another user namespace
Merge patch series "fs: don't warn when a mount is completed from another user namespace"
Jérémy Jean (1):
pid: reject allocations through dead ancestor pid namespaces
fs/binfmt_misc.c | 3 +-
fs/overlayfs/super.c | 3 +-
kernel/pid.c | 6 +-
tools/testing/selftests/Makefile | 1 +
.../selftests/filesystems/fscontext_ns/Makefile | 10 +
.../filesystems/fscontext_ns/fscontext_ns_test.c | 239 +++++++++++++++++++++
6 files changed, 258 insertions(+), 4 deletions(-)
create mode 100644 tools/testing/selftests/filesystems/fscontext_ns/Makefile
create mode 100644 tools/testing/selftests/filesystems/fscontext_ns/fscontext_ns_test.c