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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 14 Nov 2019 09:49:09 +0000
From:   Minas Harutyunyan <Minas.Harutyunyan@...opsys.com>
To:     Pan Bian <bianpan2016@....com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:     "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] usb: dwc2: fix potential double free



On 11/6/2019 5:54 AM, Pan Bian wrote:
> The member hsotg->desc_gen_cache is assigned NULL after it is destroyed
> to avoid being freed twice when the call to usb_add_hcd() fails.
> 
> Fixes: 3b5fcc9ac2f4 ("usb: dwc2: host: use kmem cache to allocate descriptors")
> 
> Signed-off-by: Pan Bian <bianpan2016@....com>

Acked-by: Minas Harutyunyan <hminas@...opsys.com>

> ---
>   drivers/usb/dwc2/hcd.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
> index 81afe553aa66..3b943352b296 100644
> --- a/drivers/usb/dwc2/hcd.c
> +++ b/drivers/usb/dwc2/hcd.c
> @@ -5183,6 +5183,7 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg)
>   				"unable to create dwc2 hs isoc desc cache\n");
>   
>   			kmem_cache_destroy(hsotg->desc_gen_cache);
> +			hsotg->desc_gen_cache = NULL;
>   
>   			/*
>   			 * Disable descriptor dma mode since it will not be
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ