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: <59231732-82a3-3a0c-db0c-eec252b35d3b@kylinos.cn>
Date:   Thu, 10 Feb 2022 09:04:40 +0800
From:   谢泓宇 <xiehongyu1@...inos.cn>
To:     Mathias Nyman <mathias.nyman@...ux.intel.com>,
        Hongyu Xie <xy521521@...il.com>, gregkh@...uxfoundation.org,
        mathias.nyman@...el.com
Cc:     linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org
Subject: Re: [PATCH -next v2] xhci: fix two places when dealing with return
 value of function xhci_check_args

Hi,

On 2022/2/9 17:29, Mathias Nyman wrote:
> On 9.2.2022 4.52, Hongyu Xie wrote:
>> From: Hongyu Xie <xiehongyu1@...inos.cn>
>>
>> xhci_check_args returns 4 types of value, -ENODEV, -EINVAL, 1 and 0.
>> xhci_urb_enqueue and xhci_check_streams_endpoint return -EINVAL if
>> the return value of xhci_check_args <= 0.
>> This will cause a problem.
>> For example, r8152_submit_rx calling usb_submit_urb in
>> drivers/net/usb/r8152.c.
>> r8152_submit_rx will never get -ENODEV after submiting an urb
>> when xHC is halted,
>> because xhci_urb_enqueue returns -EINVAL in the very beginning.
>>
>> Fixes: 203a86613fb3 ("xhci: Avoid NULL pointer deref when host dies.")
>> Cc: stable@...r.kernel.org
>> Signed-off-by: Hongyu Xie <xiehongyu1@...inos.cn>
>> ---
> Thanks, added to queue.
> Changed the commit message and header a bit:
>
> "xhci: Prevent futile URB re-submissions due to incorrect return value.
>      
> The -ENODEV return value from xhci_check_args() is incorrectly changed
> to -EINVAL in a couple places before propagated further.
>      
> xhci_check_args() returns 4 types of value, -ENODEV, -EINVAL, 1 and 0.
> xhci_urb_enqueue and xhci_check_streams_endpoint return -EINVAL if
> the return value of xhci_check_args <= 0.
> This causes problems for example r8152_submit_rx, calling usb_submit_urb
> in drivers/net/usb/r8152.c.
> r8152_submit_rx will never get -ENODEV after submiting an urb when xHC
> is halted because xhci_urb_enqueue returns -EINVAL in the very beginning."
>
> Let me know if you disagree with this.
>
> Thanks
> -Mathias

Sounds good to me.

Do I have to send another patch with commit message and header changed?

Thanks

Hongyu Xie

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ