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: <558D04B5.40505@ti.com>
Date:	Fri, 26 Jun 2015 10:52:21 +0300
From:	Roger Quadros <rogerq@...com>
To:	<vivek.bhagat@...sung.com>, <linux-usb@...r.kernel.org>,
	<gregkh@...uxfoundation.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [EDT][PATCH] XHCI: Fix memory leak in error condition

On 26/06/15 10:46, Vivek Kumar Bhagat wrote:
> EP-EC562D6B53594479BCA6FC73F17DEE54
> In error condition, td buffer is not freed which can lead
> to memory leak.
>
> Signed-off-by: Vivek Kumar Bhagat <vivek.bhagat@...sung.com>
> ---
>   drivers/usb/host/xhci.c |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 36bf089..dc02532 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -1438,6 +1438,7 @@ dying:
>   	ret = -ESHUTDOWN;
>   free_priv:
>   	xhci_urb_free_priv(urb_priv);
> +	kfree(buffer);
>   	urb->hcpriv = NULL;
>   	spin_unlock_irqrestore(&xhci->lock, flags);
>   	return ret;
>

Do you need to fix up xhci_urb_free_priv() as well?

cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ