Hello,
syzbot found the following issue on:
HEAD commit: 228da13e907e Linux 6.1.175
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=1267a0ae580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=4dd3c1715f0a309b
dashboard link:
https://syzkaller.appspot.com/bug?extid=4c39241af3f107d1028a
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/a1730af56ab4/disk-228da13e.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/eafe9b37a422/vmlinux-228da13e.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/7353ac7f337a/bzImage-228da13e.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+4c3924...@syzkaller.appspotmail.com
em28xx 4-1:0.132: Closing input extension
==================================================================
BUG: KASAN: use-after-free in media_device_unregister+0x13d/0x3f0 drivers/media/mc/mc-device.c:809
Read of size 8 at addr ffff88806120c210 by task kworker/0:1/15106
CPU: 0 PID: 15106 Comm: kworker/0:1 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Workqueue: usb_hub_wq hub_event
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:420
kasan_report+0x10b/0x140 mm/kasan/report.c:524
media_device_unregister+0x13d/0x3f0 drivers/media/mc/mc-device.c:809
em28xx_unregister_media_device drivers/media/usb/em28xx/em28xx-cards.c:3459 [inline]
em28xx_release_resources+0xaa/0x240 drivers/media/usb/em28xx/em28xx-cards.c:3480
em28xx_usb_disconnect+0x196/0x2e0 drivers/media/usb/em28xx/em28xx-cards.c:4149
usb_unbind_interface+0x1ee/0x860 drivers/usb/core/driver.c:458
device_remove drivers/base/dd.c:550 [inline]
__device_release_driver drivers/base/dd.c:1280 [inline]
device_release_driver_internal+0x522/0x850 drivers/base/dd.c:1306
bus_remove_device+0x2e2/0x400 drivers/base/bus.c:531
device_del+0x6af/0xaf0 drivers/base/core.c:3900
usb_disable_device+0x3e2/0x890 drivers/usb/core/message.c:1472
usb_disconnect+0x348/0x8a0 drivers/usb/core/hub.c:2314
hub_port_connect drivers/usb/core/hub.c:5361 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5657 [inline]
port_event drivers/usb/core/hub.c:5817 [inline]
hub_event+0x1e50/0x5560 drivers/usb/core/hub.c:5899
process_one_work+0x8a2/0x1160 kernel/workqueue.c:2292
worker_thread+0xaa2/0x1270 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
</TASK>
Allocated by task 14863:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
____kasan_kmalloc mm/kasan/common.c:375 [inline]
__kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:384
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
em28xx_v4l2_init+0x107/0x2e70 drivers/media/usb/em28xx/em28xx-video.c:2538
em28xx_init_extension+0x118/0x1b0 drivers/media/usb/em28xx/em28xx-core.c:1116
process_one_work+0x8a2/0x1160 kernel/workqueue.c:2292
worker_thread+0xaa2/0x1270 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Freed by task 14863:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
kasan_save_free_info+0x2d/0x50 mm/kasan/generic.c:516
____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:237
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1729 [inline]
slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1755
slab_free mm/slub.c:3687 [inline]
__kmem_cache_free+0xb6/0x1f0 mm/slub.c:3700
em28xx_free_v4l2 drivers/media/usb/em28xx/em28xx-video.c:2118 [inline]
kref_put include/linux/kref.h:65 [inline]
em28xx_v4l2_init+0x166c/0x2e70 drivers/media/usb/em28xx/em28xx-video.c:2907
em28xx_init_extension+0x118/0x1b0 drivers/media/usb/em28xx/em28xx-core.c:1116
process_one_work+0x8a2/0x1160 kernel/workqueue.c:2292
worker_thread+0xaa2/0x1270 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
The buggy address belongs to the object at ffff88806120c000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 528 bytes inside of
8192-byte region [ffff88806120c000, ffff88806120e000)
The buggy address belongs to the physical page:
page:ffffea0001848200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x61208
head:ffffea0001848200 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000001 ffff888017442280
raw: 0000000000000000 0000000000020002 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 16337, tgid 16337 (syz-executor), ts 1340263398759, free_ts 1340231880857
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2559
prep_new_page mm/page_alloc.c:2566 [inline]
get_page_from_freelist+0x1a1e/0x1ab0 mm/page_alloc.c:4357
__alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5657
alloc_slab_page+0x5d/0x160 mm/slub.c:1799
allocate_slab mm/slub.c:1944 [inline]
new_slab+0x87/0x2c0 mm/slub.c:1997
___slab_alloc+0xbc6/0x1240 mm/slub.c:3154
__slab_alloc mm/slub.c:3240 [inline]
slab_alloc_node mm/slub.c:3325 [inline]
__kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3398
__do_kmalloc_node mm/slab_common.c:935 [inline]
__kmalloc_node+0xa0/0x240 mm/slab_common.c:943
kmalloc_node include/linux/slab.h:589 [inline]
kvmalloc_node+0x6c/0x180 mm/util.c:581
kvmalloc include/linux/slab.h:716 [inline]
kvmalloc_array include/linux/slab.h:734 [inline]
__ptr_ring_init_queue_alloc include/linux/ptr_ring.h:471 [inline]
ptr_ring_init include/linux/ptr_ring.h:489 [inline]
wg_packet_queue_init+0x8f/0x2f0 drivers/net/wireguard/queueing.c:32
wg_newlink+0x3fd/0x730 drivers/net/wireguard/device.c:357
rtnl_newlink_create net/core/rtnetlink.c:3428 [inline]
__rtnl_newlink net/core/rtnetlink.c:3648 [inline]
rtnl_newlink+0x151e/0x20a0 net/core/rtnetlink.c:3661
rtnetlink_rcv_msg+0x87c/0xfc0 net/core/rtnetlink.c:6158
netlink_rcv_skb+0x1fb/0x450 net/netlink/af_netlink.c:2511
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x74d/0x8d0 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x8ad/0xbd0 net/netlink/af_netlink.c:1872
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1486 [inline]
free_pcp_prepare mm/page_alloc.c:1536 [inline]
free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3413
free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3508
free_slab mm/slub.c:2036 [inline]
discard_slab mm/slub.c:2042 [inline]
__unfreeze_partials+0x1a5/0x200 mm/slub.c:2591
put_cpu_partial+0x17c/0x250 mm/slub.c:2667
qlink_free mm/kasan/quarantine.c:168 [inline]
qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187
kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294
__kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:306
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737
slab_alloc_node mm/slub.c:3359 [inline]
slab_alloc mm/slub.c:3367 [inline]
__kmem_cache_alloc_lru mm/slub.c:3374 [inline]
kmem_cache_alloc+0x123/0x2f0 mm/slub.c:3383
getname_flags+0xb7/0x500 fs/namei.c:139
getname fs/namei.c:218 [inline]
__do_sys_symlinkat fs/namei.c:4525 [inline]
__se_sys_symlinkat fs/namei.c:4522 [inline]
__x64_sys_symlinkat+0x78/0xa0 fs/namei.c:4522
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Memory state around the buggy address:
ffff88806120c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88806120c180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88806120c200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88806120c280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88806120c300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup