Commit 2030c0fd authored by Michael Kerrisk's avatar Michael Kerrisk Committed by Linus Torvalds

[PATCH] PR_GET_DUMPABLE returns incorrect info

2.6.13 incorporated Alan Cox's patch for /proc/sys/fs/suid_dumpable (one
version of this patch can be found here
http://marc.theaimsgroup.com/?l=linux-kernel&m=109647550421014&w=2 ).

This patch also made corresponding changes in kernel/sys.c to change the
prctl() PR_SET_DUMPABLE operation so that the permitted range of 'arg2' was
modified from 0..1 to 0..2.

However, a corresponding change was not made for PR_GET_DUMPABLE: if the
dumpable flag is non-zero, then PR_GET_DUMPABLE always returns 1, so that
the caller can't determine the true setting of this flag.
Acked-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent afeda2c2
...@@ -1728,8 +1728,7 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, ...@@ -1728,8 +1728,7 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
error = put_user(current->pdeath_signal, (int __user *)arg2); error = put_user(current->pdeath_signal, (int __user *)arg2);
break; break;
case PR_GET_DUMPABLE: case PR_GET_DUMPABLE:
if (current->mm->dumpable) error = current->mm->dumpable;
error = 1;
break; break;
case PR_SET_DUMPABLE: case PR_SET_DUMPABLE:
if (arg2 < 0 || arg2 > 2) { if (arg2 < 0 || arg2 > 2) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment