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: <20191217191555.GF14499@iaqt7>
Date:   Tue, 17 Dec 2019 13:15:55 -0600
From:   Bin Liu <b-liu@...com>
To:     Jia-Ju Bai <baijiaju1990@...il.com>
CC:     Greg KH <gregkh@...uxfoundation.org>, <linux-usb@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: musb: Remove unnecessary check of musb->hcd in
 musb_handle_intr_connect()

Hi,

On Tue, Dec 17, 2019 at 08:27:09PM +0800, Jia-Ju Bai wrote:
> 
> 
> On 2019/12/17 17:59, Greg KH wrote:
> > On Tue, Dec 17, 2019 at 05:50:23PM +0800, Jia-Ju Bai wrote:
> > > In musb_handle_intr_connect(), musb->hcd should be non-null,
> > > so the check of musb->hcd on line 783 could be dropped.
> > Have you verified that this is always the case?  How did you do that?
> 
> Ah, so sorry, I misunderstood your last message...
> I have not verified it, but I thought you made sure of it from your last
> message, sorry...
> 
> In my opinion, adding an if check is safer, as shown in my last patch:
> "usb: musb: Fix a possible null-pointer dereference in
> musb_handle_intr_connect()"
> 
> I recall that Bin Liu has applied my last patch:
> https://patchwork.kernel.org/patch/11283007/
> 
> Maybe we can listen to his opinion or other people's opinions?

The code path this patch touches is in OTG_STATE_B_WAIT_ACON branch,
which is part of the OTG HNP handling, but OTG protocol support has been
disabled since commit 0a9134bd733b, so technically this code path won't
be reached.

Let's not bother with this ->hcd pointer check, and wait for OTG code
cleanup in this driver.

-Bin.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ