lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 4 Jan 2017 15:47:49 +0000
From:   Chris Wilson <chris@...is-wilson.co.uk>
To:     "Luis R. Rodriguez" <mcgrof@...nel.org>
Cc:     Ming Lei <ming.lei@...onical.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] firmware: Prevent oops on delayed abort

On Wed, Jan 04, 2017 at 04:40:49PM +0100, Luis R. Rodriguez wrote:
> On Wed, Jan 04, 2017 at 07:12:11PM +0800, Ming Lei wrote:
> > On Wed, Jan 4, 2017 at 5:31 PM, Chris Wilson <chris@...is-wilson.co.uk> wrote:
> > > If the firmware load is slow and cancelled, we may call fw_load_abort()
> > > twice and promptly oops on the second with a NULL dereference.
> > >
> > > Signed-off-by: Chris Wilson <chris@...is-wilson.co.uk>
> > > Cc: Ming Lei <ming.lei@...onical.com>
> > > Cc: "Luis R. Rodriguez" <mcgrof@...nel.org>
> > > Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > > ---
> > >  drivers/base/firmware_class.c | 3 +++
> > >  1 file changed, 3 insertions(+)
> > >
> > > diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
> > > index 4497d263209f..d03e21c1d2f3 100644
> > > --- a/drivers/base/firmware_class.c
> > > +++ b/drivers/base/firmware_class.c
> > > @@ -557,6 +557,9 @@ static void fw_load_abort(struct firmware_priv *fw_priv)
> > >  {
> > >         struct firmware_buf *buf = fw_priv->buf;
> > >
> > > +       if (!buf)
> > > +               return;
> > > +
> > >         __fw_load_abort(buf);
> > >
> > >         /* avoid user action after loading abort */
> > > --
> > > 2.11.0
> > >
> > 
> > Looks fine,
> > 
> > Acked-by: Ming Lei <ming.lei@...onical.com>
> 
> But does this fix an actual oops or just theoretical? If it does can you
> include the trace, and amend the commit log to Cc stable so this gets
> properly propagated into the stable kernels?

Actual oops, I was going to include the oops from dmesg but that was
lost on a the forced reboot. It's fairly clear the cause once you read
the callers.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ