[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100224115008.GA15380@hmsreliant.think-freely.org>
Date: Wed, 24 Feb 2010 06:50:08 -0500
From: Neil Horman <nhorman@...driver.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: akpm@...ux-foundation.org, viro@...iv.linux.org.uk,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] supress uid comparison test if core output files are
pipes
On Wed, Feb 24, 2010 at 12:09:03PM +0100, Oleg Nesterov wrote:
> On 02/22, Neil Horman wrote:
> >
> > --- a/fs/exec.c
> > +++ b/fs/exec.c
> > @@ -1987,8 +1987,9 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs)
> > /*
> > * Dont allow local users get cute and trick others to coredump
> > * into their pre-created files:
> > + * Note, this is not relevant for pipes
> > */
> > - if (inode->i_uid != current_fsuid())
> > + if (!ispipe && (inode->i_uid != current_fsuid()))
> > goto close_fail;
>
> Ah. This is because the previous recursion-check moved create_write_pipe()
> from current's context to kthread's context, right?
>
Yes, thats correct.
> Looks like a right (and "must have") fix for recent -mm changes to me.
>
Also correct.
>
>
> This also reminds me do_coredump() asks for cleanup. I'll try to redo/resend
> my old cleanup patches on top of your changes.
>
Cool, thanks!
Neil
> Oleg.
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists