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] [day] [month] [year] [list]
Message-ID: <20150310205045.GC18456@saruman.tx.rr.com>
Date:	Tue, 10 Mar 2015 15:50:45 -0500
From:	Felipe Balbi <balbi@...com>
To:	Peter Chen <Peter.Chen@...escale.com>
CC:	"balbi@...com" <balbi@...com>,
	Tapasweni Pathak <tapaswenipathak@...il.com>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"jg1.han@...sung.com" <jg1.han@...sung.com>,
	"benoit.taine@...6.fr" <benoit.taine@...6.fr>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"julia.lawall@...6.fr" <julia.lawall@...6.fr>
Subject: Re: [PATCH] drivers: usb: gadget: udc: Fix NULL dereference

On Tue, Mar 10, 2015 at 03:00:49AM +0000, Peter Chen wrote:
>  
> > On Tue, Mar 10, 2015 at 02:02:44AM +0000, Peter Chen wrote:
> > >
> > > > > --- a/drivers/usb/gadget/udc/lpc32xx_udc.c
> > > > > +++ b/drivers/usb/gadget/udc/lpc32xx_udc.c
> > > > > @@ -1803,7 +1803,7 @@ static int lpc32xx_ep_queue(struct usb_ep *_ep,
> > > > >  	req = container_of(_req, struct lpc32xx_request, req);
> > > > >  	ep = container_of(_ep, struct lpc32xx_ep, ep);
> > > > >
> > > > > -	if (!_req || !_req->complete || !_req->buf ||
> > > > > +	if (!_ep || !_req || !_req->complete || !_req->buf ||
> > > > >  	    !list_empty(&req->queue))
> > > > >  		return -EINVAL;
> > > > >
> > > > > @@ -1815,8 +1815,7 @@ static int lpc32xx_ep_queue(struct usb_ep *_ep,
> > > > >  	}
> > > > >
> > > > >
> > > > > -	if ((!udc) || (!udc->driver) ||
> > > > > -	    (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
> > > > > +	if ((!udc->driver) || (udc->gadget.speed == USB_SPEED_UNKNOWN))
> > > > {
> > > > >  		dev_dbg(udc->dev, "invalid device\n");
> > > > >  		return -EINVAL;
> > > > >  	}
> > > >
> > > > what's going to happen here ?
> > > >
> > >
> > > I just changed the current code, in fact, udc->driver is impossible to
> > > NULL which is cleared at .udc_stop.
> > >
> > > The speed is possible for unknown if the reset has occurred at that time.
> > 
> > oh, alright.
> 
> Do you need me or Tapasweni send patch for this?

if there's anything to be fixed, sure.

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ