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, 14 Jul 2020 12:32:27 +0000
From:   Minas Harutyunyan <Minas.Harutyunyan@...opsys.com>
To:     Marek Szyprowski <m.szyprowski@...sung.com>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Felipe Balbi <balbi@...nel.org>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] usb: dwc2: Fix error path in gadget registration

Hi Marek,

On 7/14/2020 12:48 PM, Marek Szyprowski wrote:
> When gadget registration fails, one should not call usb_del_gadget_udc().
> Ensure this by setting gadget->udc to NULL. Also in case of a failure
I was able to reproduce issue. I'm Ok with this fix.

> there is no need to disable low-level hardware, so return immiedetly
> instead of jumping to error_init label.
> 
Why do you think that disable low-level hardware not required which was 
enabled before? Also for some platforms required to call 
regulator_disable() which was enabled earlier in probe function.
So, I suggest to keep jump to error_init label.

> This fixes the following kernel NULL ptr dereference on gadget failure
> (can be easily triggered with g_mass_storage without any module
> parameters):
> 

Thanks,
Minas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ