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:	Thu, 22 Sep 2011 19:54:06 +0200
From:	Borislav Petkov <bp@...en8.de>
To:	Greg KH <gregkh@...e.de>
Cc:	"Lucas C. Villa Real" <lucasvr@...il.com>,
	linux-kernel@...r.kernel.org, Wey-Yi Guya <wey-yi.w.guy@...el.com>,
	Johannes Berg <johannes.berg@...el.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Pekka Enberg <penberg@...nel.org>
Subject: Re: [PATCH] Initialize pointer on request_firmware

On Thu, Sep 22, 2011 at 10:18:29AM -0700, Greg KH wrote:
> On Thu, Sep 22, 2011 at 11:23:47AM +0200, Borislav Petkov wrote:
> > On Wed, Sep 21, 2011 at 11:55:15PM -0300, Lucas C. Villa Real wrote:
> > > Hello, folks,
> > > 
> > > I've seen some kernel oopses when suspending my machine. The problem comes from isight_firmware, which assumes that, on error, a call to request_firmware() will initialize the provided pointer to the firmware image to NULL.
> > > 
> > > The patch below fixes the isight_firmware side of the problem and also ensures that request_firmware() always sets the pointer to NULL on such cases (it currently does that for all except one situation).
> > > 
> > > Signed-off-by: Lucas C. Villa Real <lucasvr@...olinux.org>
> > > 
> > > --- linux-3.0.4/drivers/base/firmware_class.c.orig	2011-09-21 21:03:01.000000000 -0300
> > > +++ linux-3.0.4/drivers/base/firmware_class.c	2011-09-21 21:03:13.000000000 -0300
> > > @@ -523,6 +523,7 @@ static int _request_firmware(const struc
> > >  
> > >  	if (WARN_ON(usermodehelper_is_disabled())) {
> > >  		dev_err(device, "firmware: %s will not be loaded\n", name);
> > > +		*firmware_p = NULL;
> > >  		return -EBUSY;
> > >  	}
> > 
> > Looks like f45f3c1f3f616 needs backporting to stable, if it hasn't
> > happened yet.
> 
> What stable tree?  That patch was in the 2.6.36 release, so 3.0-stable
> doesn't need it, right?

Judging by the diff lines above, 3.0.4 doesn't seem to have it. Wait,
lemme check... uh no, I can't, the damn k.org thing is still down :-(.

> > Oh, and then there's caca9510ff4e5 too which adds this
> > exit path to the goto out label as the rest of the function.
> 
> But that was only due to other problems.

That second one adds the goto thing to the "out:" label where the
firmware_p gets NULLed. IOW, it prepares the code for f45f3c1f3f616.

Does that make more sense now?

-- 
Regards/Gruss,
Boris.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ