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:	Tue, 26 Apr 2016 16:11:15 -0700
From:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Chunfeng Yun <chunfeng.yun@...iatek.com>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-usb@...r.kernel.org, linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence

On Fri, Apr 08, 2016 at 11:21:05AM -0400, Alan Stern wrote:
> On Fri, 8 Apr 2016, Greg Kroah-Hartman wrote:
> 
> > On Fri, Apr 08, 2016 at 05:08:03PM +0800, Chunfeng Yun wrote:
> > > NULL pointer dereferrence will happen when class driver
> > > wants to allocate zero length buffer and pool_max[0]
> > > can't be used, so skip reserved pool in this case.
> > 
> > Why would a driver want to allocate a 0 length buffer?  What driver does
> > this?
> > 
> > Shouldn't we fix that issue instead?
> 
> And even if a driver does want to allocate a 0-length buffer, shouldn't 
> the function simply return early instead of running through all its 
> calculations?

Yes it should, Chunfeng, can you fix this patch to do that please.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ