linux/fs/proc
Alan Cox d6e7114481 [PATCH] setuid core dump
Add a new `suid_dumpable' sysctl:

This value can be used to query and set the core dump mode for setuid
or otherwise protected/tainted binaries. The modes are

0 - (default) - traditional behaviour.  Any process which has changed
    privilege levels or is execute only will not be dumped

1 - (debug) - all processes dump core when possible.  The core dump is
    owned by the current user and no security is applied.  This is intended
    for system debugging situations only.  Ptrace is unchecked.

2 - (suidsafe) - any binary which normally would not be dumped is dumped
    readable by root only.  This allows the end user to remove such a dump but
    not access it directly.  For security reasons core dumps in this mode will
    not overwrite one another or other files.  This mode is appropriate when
    adminstrators are attempting to debug problems in a normal environment.

(akpm:

> > +EXPORT_SYMBOL(suid_dumpable);
>
> EXPORT_SYMBOL_GPL?

No problem to me.

> >  	if (current->euid == current->uid && current->egid == current->gid)
> >  		current->mm->dumpable = 1;
>
> Should this be SUID_DUMP_USER?

Actually the feedback I had from last time was that the SUID_ defines
should go because its clearer to follow the numbers. They can go
everywhere (and there are lots of places where dumpable is tested/used
as a bool in untouched code)

> Maybe this should be renamed to `dump_policy' or something.  Doing that
> would help us catch any code which isn't using the #defines, too.

Fair comment. The patch was designed to be easy to maintain for Red Hat
rather than for merging. Changing that field would create a gigantic
diff because it is used all over the place.

)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23 09:45:26 -07:00
..
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
array.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
base.c [PATCH] setuid core dump 2005-06-23 09:45:26 -07:00
generic.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
inode-alloc.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
inode.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
internal.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
kcore.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
kmsg.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mmu.c [PATCH] fix impossible VmallocChunk 2005-05-17 07:59:10 -07:00
nommu.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
proc_devtree.c [PATCH] ppc32/ppc64: cleanup /proc/device-tree 2005-06-01 07:54:14 -07:00
proc_misc.c [PATCH] add check to /proc/devices read routines 2005-06-23 09:45:19 -07:00
proc_tty.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
root.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
task_mmu.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
task_nommu.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00