[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130915162641.GA13344@redhat.com>
Date: Sun, 15 Sep 2013 18:26:41 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc: viro@...iv.linux.org.uk, rostedt@...dmis.org, fweisbec@...il.com,
mingo@...hat.com, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] argv_split: Return NULL if argument contains
nonon-whitespace.
On 09/15, Tetsuo Handa wrote:
>
> Oleg Nesterov wrote:
> > > upon core dump because helper_argv[0] == NULL at
> > >
> > > helper_argv = argv_split(GFP_KERNEL, cn.corename, NULL);
> > > call_usermodehelper_setup(helper_argv[0], ...);
> >
> > Are you sure? See above.
> >
>
> Yes, I'm sure.
I thougt you meant that call_usermodehelper_setup() crashes. "See above"
means that afaics it should crash in do_filp_open().
> execve(NULL) from user space is safe,
because it never does do_execve(NULL),
> but
> do_execve(NULL) from kernel space is not safe.
Yes, this is clear.
> > Perhaps
> >
> > --- x/kernel/kmod.c
> > +++ x/kernel/kmod.c
> > @@ -571,6 +571,9 @@ int call_usermodehelper_exec(struct subp
> > DECLARE_COMPLETION_ONSTACK(done);
> > int retval = 0;
> >
> > + if (!sub_info->path)
> > + return -EXXX;
> > +
> > helper_lock();
> > if (!khelper_wq || usermodehelper_disabled) {
> > retval = -EBUSY;
> >
> > ?
> >
>
> I'm OK with that.
OK,
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