aboutsummaryrefslogtreecommitdiff
path: root/lib/test_overflow.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <[email protected]>2020-12-15 20:42:39 -0800
committerLinus Torvalds <[email protected]>2020-12-15 22:46:15 -0800
commitc6c75deda81344c3a95d1d1f606d5cee109e5d54 (patch)
treefcb5a5a16b327e37b1a67ee6af70fc1d1518c283 /lib/test_overflow.c
parentfe719888344ccc7f0046e787a75bb15b6a40b39f (diff)
proc: fix lookup in /proc/net subdirectories after setns(2)
Commit 1fde6f21d90f ("proc: fix /proc/net/* after setns(2)") only forced revalidation of regular files under /proc/net/ However, /proc/net/ is unusual in the sense of /proc/net/foo handlers take netns pointer from parent directory which is old netns. Steps to reproduce: (void)open("/proc/net/sctp/snmp", O_RDONLY); unshare(CLONE_NEWNET); int fd = open("/proc/net/sctp/snmp", O_RDONLY); read(fd, &c, 1); Read will read wrong data from original netns. Patch forces lookup on every directory under /proc/net . Link: https://lkml.kernel.org/r/[email protected] Fixes: 1da4d377f943 ("proc: revalidate misc dentries") Signed-off-by: Alexey Dobriyan <[email protected]> Reported-by: "Rantala, Tommi T. (Nokia - FI/Espoo)" <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions