]> bbs.cooldavid.org Git - net-next-2.6.git/commit - fs/exec.c
exec.c: fix coredump to pipe problem and obscure "security hole"
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Tue, 17 Apr 2007 05:53:13 +0000 (22:53 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 17 Apr 2007 23:36:26 +0000 (16:36 -0700)
commitc4bbafda70a0fc95c6595bffd6825ef264050d01
tree92860180bea4f2e1fd515432bb165c7ae628d2af
parentc4b7e8754e3198eb5392568e523da6440143c2cd
exec.c: fix coredump to pipe problem and obscure "security hole"

The patch checks for "|" in the pattern not the output and doesn't nail a
pid on to a piped name (as it is a program name not a file)

Also fixes a very very obscure security corner case.  If you happen to have
decided on a core pattern that starts with the program name then the user
can run a program called "|myevilhack" as it stands.  I doubt anyone does
this.

Signed-off-by: Alan Cox <alan@redhat.com>
Confirmed-by: Christopher S. Aker <caker@theshore.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/exec.c