[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100224181332.5cdc2454.akpm@linux-foundation.org>
Date: Wed, 24 Feb 2010 18:13:32 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Neil Horman <nhorman@...driver.com>
Cc: oleg@...hat.com, viro@...iv.linux.org.uk,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [PATCH] supress uid comparison test if core output files are
pipes
On Wed, 24 Feb 2010 20:32:10 -0500 Neil Horman <nhorman@...driver.com> wrote:
> > > diff --git a/fs/exec.c b/fs/exec.c
> > > index 6303d18..6af2214 100644
> > > --- 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;
> > > if (!cprm.file->f_op)
> > > goto close_fail;
> >
> > hm, this actually appears to fix a regression, added by:
> >
> In a sense yes. Previously though, Ingos check was both useless for pipes
> (since you can't have a user create a pipe that will map to what the coredump
> path creates anyway, making this check useless), but it worked anyway, since the
> crashing process created the pipe, so the uid check always matched. With the
> refactoring andi and I did, thats no longer true, so the check could fail. This
> patch just fixes it up by recongnizing that the check isn't needed at all for
> pipes
Which refactoring? Please identify precisely the patch which this patch fixes up?
--
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