Re: [syzbot] [bluetooth?] [usb?] memory leak in __hci_cmd_sync_sk

syzbot
2025-11-19T19:32:07Z

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
memory leak in __hci_cmd_sync_sk

2025/11/19 19:30:48 executed programs: 47
2025/11/19 19:30:56 executed programs: 49
2025/11/19 19:31:03 executed programs: 51
2025/11/19 19:31:11 executed programs: 53
BUG: memory leak
unreferenced object 0xffff888111aec700 (size 240):
comm "kworker/u9:1", pid 5135, jiffies 4294955520
hex dump (first 32 bytes):
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 00 ................
backtrace (crc d1edf5a3):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4983 [inline]
slab_alloc_node mm/slub.c:5288 [inline]
kmem_cache_alloc_node_noprof+0x36f/0x5e0 mm/slub.c:5340
__alloc_skb+0x203/0x240 net/core/skbuff.c:660
alloc_skb include/linux/skbuff.h:1383 [inline]
bt_skb_alloc include/net/bluetooth/bluetooth.h:510 [inline]
hci_cmd_sync_alloc+0x30/0x140 net/bluetooth/hci_sync.c:58
hci_cmd_sync_add net/bluetooth/hci_sync.c:99 [inline]
__hci_cmd_sync_sk+0x84/0x290 net/bluetooth/hci_sync.c:168
__hci_cmd_sync_ev+0x3e/0x50 net/bluetooth/hci_sync.c:255
send_hci_cmd_sync+0x5e/0xf0 net/bluetooth/mgmt.c:2615
hci_cmd_sync_work+0xd5/0x160 net/bluetooth/hci_sync.c:337
process_one_work+0x26b/0x620 kernel/workqueue.c:3263
process_scheduled_works kernel/workqueue.c:3346 [inline]
worker_thread+0x2c4/0x4f0 kernel/workqueue.c:3427
kthread+0x15b/0x310 kernel/kthread.c:463
ret_from_fork+0x210/0x240 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

BUG: memory leak
unreferenced object 0xffff88810a34a680 (size 704):
comm "kworker/u9:1", pid 5135, jiffies 4294955520
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace (crc 4e765d9f):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4983 [inline]
slab_alloc_node mm/slub.c:5288 [inline]
kmem_cache_alloc_node_noprof+0x36f/0x5e0 mm/slub.c:5340
kmalloc_reserve+0xe6/0x180 net/core/skbuff.c:579
__alloc_skb+0xd4/0x240 net/core/skbuff.c:670
alloc_skb include/linux/skbuff.h:1383 [inline]
bt_skb_alloc include/net/bluetooth/bluetooth.h:510 [inline]
hci_cmd_sync_alloc+0x30/0x140 net/bluetooth/hci_sync.c:58
hci_cmd_sync_add net/bluetooth/hci_sync.c:99 [inline]
__hci_cmd_sync_sk+0x84/0x290 net/bluetooth/hci_sync.c:168
__hci_cmd_sync_ev+0x3e/0x50 net/bluetooth/hci_sync.c:255
send_hci_cmd_sync+0x5e/0xf0 net/bluetooth/mgmt.c:2615
hci_cmd_sync_work+0xd5/0x160 net/bluetooth/hci_sync.c:337
process_one_work+0x26b/0x620 kernel/workqueue.c:3263
process_scheduled_works kernel/workqueue.c:3346 [inline]
worker_thread+0x2c4/0x4f0 kernel/workqueue.c:3427
kthread+0x15b/0x310 kernel/kthread.c:463
ret_from_fork+0x210/0x240 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

connection error: failed to recv *flatrpc.ExecutorMessageRawT: EOF

Tested on:

commit: 23cb64fb Merge tag 'soc-fixes-6.18-3' of git://git.ker..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13e81a12580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f30cc590c4f6da44
dashboard link: https://syzkaller.appspot.com/bug?extid=f098d64cc684b8dbaf65
compiler: gcc (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=10d6f332580000