Messages in this thread | | | Date | Wed, 24 Feb 2010 06:50:08 -0500 | From | Neil Horman <> | 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. > >
| |