videodev: debug: v4l2_open() vdev: ffff8881cd928200 ================================================================== BUG: KASAN: use-after-free in v4l2_open+0x3be/0x3d0 drivers/media/v4l2-core/v4l2-dev.c:429 Read of size 4 at addr ffff8881cd928968 by task v4l_id/3219 CPU: 1 PID: 3219 Comm: v4l_id Not tainted 5.9.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x16e lib/dump_stack.c:118 print_address_description.constprop.0+0x1c/0x210 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x37/0x7c mm/kasan/report.c:530 v4l2_open+0x3be/0x3d0 drivers/media/v4l2-core/v4l2-dev.c:429 chrdev_open+0x266/0x770 fs/char_dev.c:414 do_dentry_open+0x4b4/0x1090 fs/open.c:817 do_open fs/namei.c:3251 [inline] path_openat+0x190d/0x2690 fs/namei.c:3368 do_filp_open+0x17e/0x3c0 fs/namei.c:3395 do_sys_openat2+0x16d/0x420 fs/open.c:1168 do_sys_open fs/open.c:1184 [inline] __do_sys_open fs/open.c:1192 [inline] __se_sys_open fs/open.c:1188 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1188 do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f3e93a0d840 Code: 73 01 c3 48 8b 0d 68 77 20 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 bb 20 00 00 75 10 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 1e f6 ff ff 48 89 04 24 RSP: 002b:00007ffdcefeba98 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007ffdcefebc08 RCX: 00007f3e93a0d840 RDX: 00007f3e939f9ea0 RSI: 0000000000000000 RDI: 00007ffdcefecf24 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 0000564c499778d0 R13: 00007ffdcefebc00 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the page: page:00000000ddf4c50b refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x1cd928 flags: 0x200000000000000() raw: 0200000000000000 ffffea00072c9f08 ffffea0007330b08 0000000000000000 raw: 0000000000000000 0000000000000002 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881cd928800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881cd928880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881cd928900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881cd928980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881cd928a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================