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]
Message-ID: <0b87d2b7-3200-7f6f-c4ee-e9e1fe6161fe@kernel.org>
Date:   Tue, 22 Jan 2019 16:05:28 -0700
From:   shuah <shuah@...nel.org>
To:     Greg KH <gregkh@...uxfoundation.org>,
        Shuah Khan <skhan@...uxfoundation.org>
Cc:     valentina.manea.m@...il.com, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org, shuah <shuah@...nel.org>
Subject: Re: [PATCH] usbip: Fix vep_free_request() null pointer checks on
 input args

On 1/19/19 1:17 AM, Greg KH wrote:
> On Fri, Jan 18, 2019 at 02:29:30PM -0700, Shuah Khan wrote:
>> From: Shuah Khan <shuah@...nel.org>
>>
>> Fix vep_free_request() to return when usb_ep and usb_request are null
>> instead of calling WARN_ON.
>>
>> Signed-off-by: Shuah Khan <shuah@...nel.org>
>> ---
>>   drivers/usb/usbip/vudc_dev.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/usbip/vudc_dev.c b/drivers/usb/usbip/vudc_dev.c
>> index 1634d8698e15..bfc8218e3fb6 100644
>> --- a/drivers/usb/usbip/vudc_dev.c
>> +++ b/drivers/usb/usbip/vudc_dev.c
>> @@ -297,7 +297,7 @@ static void vep_free_request(struct usb_ep *_ep, struct usb_request *_req)
>>   {
>>   	struct vrequest *req;
>>   
>> -	if (WARN_ON(!_ep || !_req))
>> +	if (!_ep || !_req)
> 
> It's impossible for _ep to be NULL in this callback (see
> usb_ep_free_request() for where this is called from to prove that), so I
> don't think you need to check that.  It's almost impossible for _req to
> be NULL, so you might as well leave that check in.
> 

Yes. ep can never be null here in vep_free_request(). I will leave
this alone.

thanks,
-- Shuah



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ