linux/fs/proc
Djalal Harouni bc452b4b65 proc: do not allow negative offsets on /proc/<pid>/environ
__mem_open() which is called by both /proc/<pid>/environ and
/proc/<pid>/mem ->open() handlers will allow the use of negative offsets.
/proc/<pid>/mem has negative offsets but not /proc/<pid>/environ.

Clean this by moving the 'force FMODE_UNSIGNED_OFFSET flag' to mem_open()
to allow negative offsets only on /proc/<pid>/mem.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Brad Spengler <spender@grsecurity.net>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-30 17:25:20 -07:00
..
Kconfig
Makefile
array.c c/r: procfs: add arg_start/end, env_start/end and exit_code members to /proc/$pid/stat 2012-05-31 17:49:32 -07:00
base.c proc: do not allow negative offsets on /proc/<pid>/environ 2012-07-30 17:25:20 -07:00
cmdline.c
consoles.c
cpuinfo.c
devices.c
generic.c stop passing nameidata to ->lookup() 2012-07-14 16:34:32 +04:00
inode.c avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
internal.h stop passing nameidata to ->lookup() 2012-07-14 16:34:32 +04:00
interrupts.c
kcore.c
kmsg.c
loadavg.c
meminfo.c
mmu.c
namespaces.c stop passing nameidata to ->lookup() 2012-07-14 16:34:32 +04:00
nommu.c
page.c
proc_devtree.c of: Improve prom_update_property() function 2012-07-11 15:26:51 +10:00
proc_net.c stop passing nameidata to ->lookup() 2012-07-14 16:34:32 +04:00
proc_sysctl.c stop passing nameidata to ->lookup() 2012-07-14 16:34:32 +04:00
proc_tty.c
root.c VFS: Pass mount flags to sget() 2012-07-14 16:38:34 +04:00
softirqs.c
stat.c
task_mmu.c proc/smaps: show amount of nonlinear ptes in vma 2012-05-31 17:49:29 -07:00
task_nommu.c proc: remove mm_for_maps() 2012-05-31 17:49:28 -07:00
uptime.c
version.c
vmcore.c