]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
proc: block mounting on top of /proc/<pid>/fd/*
authorChristian Brauner <brauner@kernel.org>
Tue, 6 Aug 2024 16:02:31 +0000 (18:02 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 30 Aug 2024 06:22:13 +0000 (08:22 +0200)
commit74ce208089f468db26eddcc5ea58e50f5bbbc291
tree19f40cdf73b8899bff2257bae2698304cc90460e
parent3836b31c3e717fcaa2b63c69e4bcf8ff7b82e6e4
proc: block mounting on top of /proc/<pid>/fd/*

Entries under /proc/<pid>/fd/* are ephemeral and may go away before the
process dies. As such allowing them to be used as mount points creates
the ability to leak mounts that linger until the process dies with no
ability to unmount them until then. Don't allow using them as
mountpoints.

Link: https://lore.kernel.org/r/20240806-work-procfs-v1-5-fb04e1d09f0c@kernel.org
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/proc/fd.c