syzbot


KASAN: null-ptr-deref Write in v4l2_prio_open

Status: upstream: reported on 2025/07/09 13:34
Reported-by: syzbot+91ce5587f4c8b320926c@syzkaller.appspotmail.com
First crash: 4d18h, last: 4d18h

Sample crash report:
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
BUG: KASAN: null-ptr-deref in atomic_inc include/linux/atomic/atomic-instrumented.h:181 [inline]
BUG: KASAN: null-ptr-deref in v4l2_prio_change drivers/media/v4l2-core/v4l2-dev.c:265 [inline]
BUG: KASAN: null-ptr-deref in v4l2_prio_open+0x5b/0x110 drivers/media/v4l2-core/v4l2-dev.c:275
Write of size 4 at addr 0000000000000008 by task v4l_id/5029

CPU: 1 PID: 5029 Comm: v4l_id Not tainted 5.15.186-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
 __kasan_report mm/kasan/report.c:438 [inline]
 kasan_report+0xd5/0x130 mm/kasan/report.c:451
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x27b/0x290 mm/kasan/generic.c:189
 instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
 atomic_inc include/linux/atomic/atomic-instrumented.h:181 [inline]
 v4l2_prio_change drivers/media/v4l2-core/v4l2-dev.c:265 [inline]
 v4l2_prio_open+0x5b/0x110 drivers/media/v4l2-core/v4l2-dev.c:275
 v4l2_fh_add drivers/media/v4l2-core/v4l2-fh.c:48 [inline]
 v4l2_fh_open+0x2b1/0x430 drivers/media/v4l2-core/v4l2-fh.c:64
 em28xx_v4l2_open+0x152/0x990 drivers/media/usb/em28xx/em28xx-video.c:2163
 v4l2_open+0x20b/0x360 drivers/media/v4l2-core/v4l2-dev.c:427
 chrdev_open+0x597/0x670 fs/char_dev.c:414
 do_dentry_open+0x7ff/0xf80 fs/open.c:826
 do_open fs/namei.c:3608 [inline]
 path_openat+0x2682/0x2f30 fs/namei.c:3742
 do_filp_open+0x1b3/0x3e0 fs/namei.c:3769
 do_sys_openat2+0x142/0x4a0 fs/open.c:1253
 do_sys_open fs/open.c:1269 [inline]
 __do_sys_openat fs/open.c:1285 [inline]
 __se_sys_openat fs/open.c:1280 [inline]
 __x64_sys_openat+0x135/0x160 fs/open.c:1280
 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:0x7fd2a3324407
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:00007fffb6bbcc90 EFLAGS: 00000202 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fd2a3236880 RCX: 00007fd2a3324407
RDX: 0000000000000000 RSI: 00007fffb6bbef1c RDI: ffffffffffffff9c
RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000
R13: 00007fffb6bbcee0 R14: 00007fd2a3ab2000 R15: 00005609d16fd4d8
 </TASK>
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/09 13:33 linux-5.15.y 3dea0e7f549e f4e5e155 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: null-ptr-deref Write in v4l2_prio_open
* Struck through repros no longer work on HEAD.