Hello,
syzbot found the following issue on:
HEAD commit: 0248c33e835e Linux 5.15.221
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=17957905580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=21845b39f8fc6be8
dashboard link:
https://syzkaller.appspot.com/bug?extid=1bb729153e38f7a7b30f
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/cdcbd8738a16/disk-0248c33e.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/864175e96c3d/vmlinux-0248c33e.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/cb031d3f4011/bzImage-0248c33e.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+1bb729...@syzkaller.appspotmail.com
em28xx 6-1:1.0: Closing input extension
==================================================================
BUG: KASAN: use-after-free in media_device_unregister+0x13b/0x3f0 drivers/media/mc/mc-device.c:823
Read of size 8 at addr ffff88805e378210 by task kworker/1:1/23
CPU: 1 PID: 23 Comm: kworker/1:1 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: usb_hub_wq hub_event
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
print_address_description+0x60/0x2d0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0xdf/0x130 mm/kasan/report.c:451
media_device_unregister+0x13b/0x3f0 drivers/media/mc/mc-device.c:823
em28xx_unregister_media_device drivers/media/usb/em28xx/em28xx-cards.c:3465 [inline]
em28xx_release_resources+0xaa/0x240 drivers/media/usb/em28xx/em28xx-cards.c:3486
em28xx_usb_disconnect+0x196/0x2e0 drivers/media/usb/em28xx/em28xx-cards.c:4153
usb_unbind_interface+0x203/0x870 drivers/usb/core/driver.c:458
__device_release_driver drivers/base/dd.c:1249 [inline]
device_release_driver_internal+0x487/0x710 drivers/base/dd.c:1282
bus_remove_device+0x2dd/0x400 drivers/base/bus.c:531
device_del+0x63f/0xa80 drivers/base/core.c:3615
usb_disable_device+0x3e7/0x8a0 drivers/usb/core/message.c:1472
usb_disconnect+0x33c/0x8a0 drivers/usb/core/hub.c:2292
hub_port_connect drivers/usb/core/hub.c:5346 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5642 [inline]
port_event drivers/usb/core/hub.c:5804 [inline]
hub_event+0x1d64/0x5260 drivers/usb/core/hub.c:5886
process_one_work+0x867/0xff0 kernel/workqueue.c:2310
process_scheduled_works kernel/workqueue.c:2373 [inline]
worker_thread+0xd93/0x12a0 kernel/workqueue.c:2459
kthread+0x42e/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
</TASK>
The buggy address belongs to the page:
page:ffffea000178de00 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x2 pfn:0x5e378
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0001a03408 ffffea0001a30b08 0000000000000000
raw: 0000000000000002 0000000000000002 00000000ffffff7f 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x140dc0(GFP_USER|__GFP_COMP|__GFP_ZERO), pid 4795, ts 366033158151, free_ts 366553634655
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192
__alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501
kmalloc_order+0x40/0x150 mm/slab_common.c:986
kmalloc_order_trace+0x14/0xf0 mm/slab_common.c:1002
kmalloc_large include/linux/slab.h:536 [inline]
kmalloc include/linux/slab.h:600 [inline]
kzalloc include/linux/slab.h:738 [inline]
em28xx_v4l2_init+0xd5/0x2cd0 drivers/media/usb/em28xx/em28xx-video.c:2548
em28xx_init_extension+0x118/0x1c0 drivers/media/usb/em28xx/em28xx-core.c:1126
process_one_work+0x867/0xff0 kernel/workqueue.c:2310
process_scheduled_works kernel/workqueue.c:2373 [inline]
worker_thread+0xe01/0x12a0 kernel/workqueue.c:2462
kthread+0x42e/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1340 [inline]
free_pcp_prepare mm/page_alloc.c:1391 [inline]
free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317
free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396
free_nonslab_page+0xde/0x150 mm/slub.c:3540
em28xx_free_v4l2 drivers/media/usb/em28xx/em28xx-video.c:2128 [inline]
kref_put include/linux/kref.h:65 [inline]
em28xx_v4l2_init+0x155a/0x2cd0 drivers/media/usb/em28xx/em28xx-video.c:2917
em28xx_init_extension+0x118/0x1c0 drivers/media/usb/em28xx/em28xx-core.c:1126
process_one_work+0x867/0xff0 kernel/workqueue.c:2310
process_scheduled_works kernel/workqueue.c:2373 [inline]
worker_thread+0xe01/0x12a0 kernel/workqueue.c:2462
kthread+0x42e/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
Memory state around the buggy address:
ffff88805e378100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88805e378180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88805e378200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88805e378280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88805e378300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
---
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