================================================================== BUG: KASAN: use-after-free in v4l2_fh_init+0x279/0x2c0 drivers/media/v4l2-core/v4l2-fh.c:25 Read of size 8 at addr ffff8881ccdb88c8 by task v4l_id/366 CPU: 0 PID: 366 Comm: v4l_id Not tainted 5.7.0-rc1-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+0xef/0x16e lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x314 mm/kasan/report.c:382 __kasan_report.cold+0x37/0x92 mm/kasan/report.c:511 kasan_report+0x33/0x50 mm/kasan/common.c:625 v4l2_fh_init+0x279/0x2c0 drivers/media/v4l2-core/v4l2-fh.c:25 v4l2_fh_open+0x88/0xc0 drivers/media/v4l2-core/v4l2-fh.c:63 em28xx_v4l2_open+0x11a/0x570 drivers/media/usb/em28xx/em28xx-video.c:2163 v4l2_open+0x20f/0x3d0 drivers/media/v4l2-core/v4l2-dev.c:423 chrdev_open+0x219/0x5c0 fs/char_dev.c:414 do_dentry_open+0x4ac/0x1160 fs/open.c:797 do_open fs/namei.c:3229 [inline] path_openat+0x1a0b/0x2740 fs/namei.c:3346 do_filp_open+0x192/0x260 fs/namei.c:3373 do_sys_openat2+0x585/0x7d0 fs/open.c:1148 do_sys_open+0xc3/0x140 fs/open.c:1164 do_syscall_64+0xb6/0x5a0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x7fb265a1e840 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:00007ffde28eef58 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007ffde28ef0c8 RCX: 00007fb265a1e840 RDX: 00007fb265a0aea0 RSI: 0000000000000000 RDI: 00007ffde28eff25 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 000055d0b2efe8d0 R13: 00007ffde28ef0c0 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the page: page:ffffea0007336e00 refcount:0 mapcount:-128 mapping:00000000304d2c6c index:0x0 flags: 0x200000000000000() raw: 0200000000000000 ffffea0007322508 ffff88821fffabd0 0000000000000000 raw: 0000000000000000 0000000000000002 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881ccdb8780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881ccdb8800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881ccdb8880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881ccdb8900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881ccdb8980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================