Commit:     c46f739dd39db3b07ab5deb4e3ec81e1c04a91af
Parent:     a531a141089714efe39eca89593524fdf05104f2
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 28 13:59:18 2007 +0100
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Nov 28 10:58:01 2007 -0800

    vfs: coredumping fix
    only allow coredumping to the same uid that the coredumping
    task runs under.
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Acked-by: Alan Cox <[EMAIL PROTECTED]>
    Acked-by: Christoph Hellwig <[EMAIL PROTECTED]>
    Acked-by: Al Viro <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/exec.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

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)
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to