]> www.infradead.org Git - users/willy/linux.git/commit
proc: block mounting on top of /proc/<pid>/map_files/*
authorChristian Brauner <brauner@kernel.org>
Tue, 6 Aug 2024 16:02:30 +0000 (18:02 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 30 Aug 2024 06:22:12 +0000 (08:22 +0200)
commit3836b31c3e717fcaa2b63c69e4bcf8ff7b82e6e4
treee7c3f9780c5cf6e540b4fa2d1f57ed72f2b998ec
parent32a0a965b8a5b7b505babae2ee10c513ede376d8
proc: block mounting on top of /proc/<pid>/map_files/*

Entries under /proc/<pid>/map_files/* 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-4-fb04e1d09f0c@kernel.org
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/proc/base.c