Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c46f739d authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds
Browse files

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: default avatarIngo Molnar <mingo@elte.hu>
Acked-by: default avatarAlan Cox <alan@redhat.com>
Acked-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarAl Viro <viro@ftp.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a531a141
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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)