linux-hardened/fs/proc
Eric W. Biederman 0f2fe20f55 [PATCH] proc: Properly filter out files that are not visible to a process
Long ago and far away in 2.2 we started checking to ensure the files we
displayed in /proc were visible to the current process.  It was an
unsophisticated time and no one was worried about functions full of FIXMES in
a stable kernel.  As time passed the function became sacred and was enshrined
in the shrine of how things have always been.  The fixes came in but only to
keep the function working no one really remembering or documenting why we did
things that way.

The intent and the functionality make a lot of sense.  Don't let /proc be an
access point for files a process can see no other way.  The implementation
however is completely wrong.

We are currently checking the root directories of the two processes, we are
not checking the actual file descriptors themselves.

We are strangely checking with a permission method instead of just when we use
the data.

This patch fixes the logic to actually check the file descriptors and make a
note that implementing a permission method for this part of /proc almost
certainly indicates a bug in the reasoning.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:24 -07:00
..
array.c [PATCH] hrtimers: remove it_real_value calculation from proc/*/stat 2006-03-26 08:57:02 -08:00
base.c [PATCH] proc: Properly filter out files that are not visible to a process 2006-06-26 09:58:24 -07:00
generic.c [PATCH] mark f_ops const in the inode 2006-03-28 09:16:05 -08:00
inode-alloc.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
inode.c [PATCH] proc: Replace proc_inode.type with proc_inode.fd 2006-06-26 09:58:24 -07:00
internal.h [PATCH] proc: Replace proc_inode.type with proc_inode.fd 2006-06-26 09:58:24 -07:00
kcore.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
kmsg.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
Makefile [PATCH] kdump: Access dump file in elf format (/proc/vmcore) 2005-06-25 16:24:53 -07:00
mmu.c [PATCH] fix impossible VmallocChunk 2005-05-17 07:59:10 -07:00
nommu.c [PATCH] output of /proc/maps on nommu systems is incomplete 2005-10-17 17:03:57 -07:00
proc_devtree.c [PATCH] powerpc: Cope with duplicate node & property names in /proc/device-tree 2006-03-28 16:45:23 +11:00
proc_misc.c [PATCH] Simplify proc/devices and fix early termination regression 2006-03-31 12:18:53 -08:00
proc_tty.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
root.c [PATCH] VFS: Permit filesystem to override root dentry on mount 2006-06-23 07:42:45 -07:00
task_mmu.c [PATCH] smaps: shared fix 2006-03-06 18:40:45 -08:00
task_nommu.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vmcore.c [PATCH] kdump proc vmcore size oveflow fix 2006-04-11 06:18:42 -07:00