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: <1321947516.2011.19.camel@aeonflux>
Date:	Tue, 22 Nov 2011 08:38:36 +0100
From:	Marcel Holtmann <marcel@...tmann.org>
To:	Cong Wang <amwang@...hat.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	"Gustavo F. Padovan" <padovan@...fusion.mobi>,
	linux-bluetooth@...r.kernel.org
Subject: Re: [Patch] btusb: fix a memory leak in btusb_send_frame()

Hi Cong,

> This patch fixes the following memory leak reported by kmemleak:
> 
> unreferenced object 0xffff880060a53840 (size 192):
>   comm "softirq", pid 0, jiffies 4320571771 (age 1406.569s)
>   hex dump (first 32 bytes):
>     01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>   backtrace:
>     [<ffffffff81138a1c>] create_object+0x187/0x28b
>     [<ffffffff814be12e>] kmemleak_alloc+0x73/0x98
>     [<ffffffff811289d3>] __kmalloc+0xfc/0x123
>     [<ffffffff81386546>] usb_alloc_urb+0x1e/0x48
>     [<ffffffffa0130274>] btusb_send_frame+0x86/0x385 [btusb]
>     [<ffffffffa02d8230>] hci_send_frame+0xa0/0xa5 [bluetooth]
>     [<ffffffffa02d8a4e>] hci_cmd_task+0xa0/0xfb [bluetooth]
>     [<ffffffff81058548>] tasklet_action+0x8f/0xef
>     [<ffffffff81058a4c>] __do_softirq+0xf4/0x1db
>     [<ffffffff81058bb7>] run_ksoftirqd+0x84/0x129
>     [<ffffffff8106f1c4>] kthread+0xa0/0xa8
>     [<ffffffff814dd144>] kernel_thread_helper+0x4/0x10
>     [<ffffffffffffffff>] 0xffffffffffffffff
> 
> The problem is that when inc_tx() returns non-zero, we forgot
> to call usb_free_urb().
> 
> Cc: Marcel Holtmann <marcel@...tmann.org>
> Cc: "Gustavo F. Padovan" <padovan@...fusion.mobi>
> Signed-off-by: WANG Cong <amwang@...hat.com>

Acked-by: Marcel Holtmann <marcel@...tmann.org>

Regards

Marcel


--
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