commit c46f739dd39db3b07ab5deb4e3ec81e1c04a91af Author: Ingo Molnar Date: Wed Nov 28 13:59:18 2007 +0100 vfs: coredumping fix fix: http://bugzilla.kernel.org/show_bug.cgi?id=3043 only allow coredumping to the same uid that the coredumping task runs under. Signed-off-by: Ingo Molnar Acked-by: Alan Cox Acked-by: Christoph Hellwig Acked-by: Al Viro Signed-off-by: Linus Torvalds Index: pardus-2.6/fs/exec.c =================================================================== --- pardus-2.6.orig/fs/exec.c +++ pardus-2.6/fs/exec.c @@ -1524,6 +1524,12 @@ int do_coredump(long signr, int exit_cod if (!S_ISREG(inode->i_mode)) goto close_fail; + /* + * Dont allow local users get cute and trick others to coredump + * into their pre-created files: + */ + if (inode->i_uid != current->fsuid) + goto close_fail; if (!file->f_op) goto close_fail; if (!file->f_op->write)