Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24-rc3-git7 /fs/exec.c

Filename:/fs/exec.c
Lines Added:6
Lines Deleted:0
Also changed in: (Previous) 2.6.24-rc3-git6  2.6.24-rc3-git5  2.6.24-rc3-git4  2.6.24-rc3  2.6.24-rc2-git6  2.6.24-rc2-git5 
(Following) 2.6.24-rc4  2.6.24-rc5  2.6.24-rc6  2.6.24-rc7  2.6.24-rc8  2.6.24 

Location
[  2.6.24-rc3-git7
  [  fs
     o  exec.c

Patch

diff --git a/fs/exec.c b/fs/exec.c
index 4ccaaa4..282240a 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1780,6 +1780,12 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs)
       but keep the previous behaviour for now. */
    if (!ispipe && !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)


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.