syzbot


KASAN: use-after-free Read in v4l2_open

Status: upstream: reported on 2026/06/03 16:24
Reported-by: syzbot+c1dd77b4721771edcc8f@syzkaller.appspotmail.com
First crash: 1d16h, last: 1d16h
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in v4l2_open prio:high usb media 19 C error 1103 28m 78d 0/29 upstream: reported C repro on 2026/03/19 07:21
linux-6.1 KASAN: use-after-free Read in v4l2_open 19 3 1d01h 1d11h 0/3 upstream: reported on 2026/06/03 20:38
linux-6.6 KASAN: slab-use-after-free Read in v4l2_open 19 C 3 1d13h 22d 0/2 upstream: reported C repro on 2026/05/14 00:02

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in v4l2_open+0x352/0x360 drivers/media/v4l2-core/v4l2-dev.c:432
Read of size 4 at addr ffff8880660849b0 by task v4l_id/6177

CPU: 1 PID: 6177 Comm: v4l_id Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
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
 v4l2_open+0x352/0x360 drivers/media/v4l2-core/v4l2-dev.c:432
 chrdev_open+0x5c5/0x6a0 fs/char_dev.c:414
 do_dentry_open+0x7ff/0xf80 fs/open.c:826
 do_open fs/namei.c:3616 [inline]
 path_openat+0x26f5/0x2fa0 fs/namei.c:3750
 do_filp_open+0x1e2/0x410 fs/namei.c:3777
 do_sys_openat2+0x150/0x4b0 fs/open.c:1255
 do_sys_open fs/open.c:1271 [inline]
 __do_sys_openat fs/open.c:1287 [inline]
 __se_sys_openat fs/open.c:1282 [inline]
 __x64_sys_openat+0x135/0x160 fs/open.c:1282
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fe6e4801407
Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007ffd81ab9650 EFLAGS: 00000202 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe6e4713880 RCX: 00007fe6e4801407
RDX: 0000000000000000 RSI: 00007ffd81ab9f19 RDI: ffffffffffffff9c
RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000
R13: 00007ffd81ab98a0 R14: 00007fe6e4f8f000 R15: 000055e75eca24d8
 </TASK>

The buggy address belongs to the page:
page:ffffea0001982100 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x66084
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffff8880b91409f0 ffff8880b91409f0 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 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 23, ts 152501579330, free_ts 152781204874
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x1bbd/0x1ca0 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+0xe2/0x2e50 drivers/media/usb/em28xx/em28xx-video.c:2548
 em28xx_init_extension+0x118/0x1b0 drivers/media/usb/em28xx/em28xx-core.c:1126
 process_one_work+0x85f/0x1010 kernel/workqueue.c:2310
 process_scheduled_works kernel/workqueue.c:2373 [inline]
 worker_thread+0xdcf/0x1290 kernel/workqueue.c:2462
 kthread+0x436/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+0xe2/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+0x1649/0x2e50 drivers/media/usb/em28xx/em28xx-video.c:2917
 em28xx_init_extension+0x118/0x1b0 drivers/media/usb/em28xx/em28xx-core.c:1126
 process_one_work+0x85f/0x1010 kernel/workqueue.c:2310
 process_scheduled_works kernel/workqueue.c:2373 [inline]
 worker_thread+0xdcf/0x1290 kernel/workqueue.c:2462
 kthread+0x436/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

Memory state around the buggy address:
 ffff888066084880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888066084900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888066084980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                     ^
 ffff888066084a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888066084a80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/06/03 16:23 linux-5.15.y dc027a595035 234057e5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in v4l2_open
* Struck through repros no longer work on HEAD.