Hello, Al.
What would you suggest if FMODE_EXEC is not the right choice?
On 2019/01/22 9:51, Kees Cook wrote:
> On Tue, Jan 22, 2019 at 10:18 AM Al Viro wrote:
>> We are *NOT* going to use current->in_execve to propagate that information.
>> Come up with a cleaner solution, if you care, but
Tetsuo Handa wrote:
> Andrew Morton wrote:
> > > --- a/fs/open.c
> > > +++ b/fs/open.c
> > > @@ -733,6 +733,12 @@ static int do_dentry_open(struct file *f,
> > > return 0;
> > > }
> > >
> > > + /* Any file opened for execve()/uselib() has to be a regular file. */
> > > + if
Andrew Morton wrote:
> > --- a/fs/open.c
> > +++ b/fs/open.c
> > @@ -733,6 +733,12 @@ static int do_dentry_open(struct file *f,
> > return 0;
> > }
> >
> > + /* Any file opened for execve()/uselib() has to be a regular file. */
> > + if (unlikely(f->f_flags & FMODE_EXEC &&
goto cleanup_file;
> > > + }
> >
> > We are *NOT* going to use current->in_execve to propagate that information.
>
> You mean check FMODE_EXEC instead of current->in_execve ?
>
> >From f80b32e1c3fbd65672387ee441a32ab58db456f8 Mon Sep 17 00:00:00 2001
> Fro
ODE_EXEC instead of current->in_execve ?
>From f80b32e1c3fbd65672387ee441a32ab58db456f8 Mon Sep 17 00:00:00 2001
From: Tetsuo Handa
Date: Tue, 22 Jan 2019 09:34:35 +0900
Subject: [PATCH v2] fs: Allow opening only regular files during execve().
syzbot is hitting lockdep warning [1]
5 matches
Mail list logo