Re: [syzbot] [usb?] memory leak in hub_event (4)

From: syzbot

Date: Sat Apr 25 2026 - 03:13:18 EST


Hello,

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

BUG: memory leak
unreferenced object 0xffff8881149d6000 (size 2048):
comm "kworker/0:2", pid 807, jiffies 4294949998
hex dump (first 32 bytes):
ff ff ff ff 31 00 00 00 00 00 00 00 00 00 00 00 ....1...........
00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 ................
backtrace (crc 6a8f68af):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4574 [inline]
slab_alloc_node mm/slub.c:4898 [inline]
__kmalloc_cache_noprof+0x371/0x480 mm/slub.c:5410
kmalloc_noprof include/linux/slab.h:950 [inline]
kzalloc_noprof include/linux/slab.h:1188 [inline]
usb_alloc_dev+0x36/0x4e0 drivers/usb/core/usb.c:651
hub_port_connect drivers/usb/core/hub.c:5471 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5708 [inline]
port_event drivers/usb/core/hub.c:5872 [inline]
hub_event+0x14d0/0x2180 drivers/usb/core/hub.c:5954
process_one_work+0x277/0x5b0 kernel/workqueue.c:3302
process_scheduled_works kernel/workqueue.c:3385 [inline]
worker_thread+0x255/0x4a0 kernel/workqueue.c:3466
kthread+0x14e/0x1a0 kernel/kthread.c:436
ret_from_fork+0x219/0x490 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

BUG: memory leak
unreferenced object 0xffff888129f4a800 (size 256):
comm "kworker/0:2", pid 807, jiffies 4294950032
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 08 a8 f4 29 81 88 ff ff ...........)....
08 a8 f4 29 81 88 ff ff b0 7d 41 83 ff ff ff ff ...).....}A.....
backtrace (crc c705f08):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4574 [inline]
slab_alloc_node mm/slub.c:4898 [inline]
__kmalloc_cache_noprof+0x371/0x480 mm/slub.c:5410
kmalloc_noprof include/linux/slab.h:950 [inline]
kzalloc_noprof include/linux/slab.h:1188 [inline]
device_private_init drivers/base/core.c:3536 [inline]
device_add+0x73c/0xc70 drivers/base/core.c:3587
usb_new_device.cold+0x115/0x633 drivers/usb/core/hub.c:2695
hub_port_connect drivers/usb/core/hub.c:5568 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5708 [inline]
port_event drivers/usb/core/hub.c:5872 [inline]
hub_event+0x1723/0x2180 drivers/usb/core/hub.c:5954
process_one_work+0x277/0x5b0 kernel/workqueue.c:3302
process_scheduled_works kernel/workqueue.c:3385 [inline]
worker_thread+0x255/0x4a0 kernel/workqueue.c:3466
kthread+0x14e/0x1a0 kernel/kthread.c:436
ret_from_fork+0x219/0x490 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: 27d128c1 Merge tag 'trace-ring-buffer-v7.1-3' of git:/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17a91c36580000
kernel config: https://syzkaller.appspot.com/x/.config?x=9645c21cfd1d3e8f
dashboard link: https://syzkaller.appspot.com/bug?extid=2afd7e71155c7e241560
compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
patch: https://syzkaller.appspot.com/x/patch.diff?x=1027e2ce580000