================================================================== 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 ffff8881cd21c8c8 by task v4l_id/354 CPU: 1 PID: 354 Comm: v4l_id Not tainted 5.8.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+0xf6/0x16e lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x415 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x37/0x7c mm/kasan/report.c:530 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+0x4fd/0x1170 fs/open.c:828 do_open fs/namei.c:3243 [inline] path_openat+0x1cc5/0x26c0 fs/namei.c:3360 do_filp_open+0x192/0x260 fs/namei.c:3387 do_sys_openat2+0x585/0x7d0 fs/open.c:1179 do_sys_open+0xc3/0x140 fs/open.c:1195 do_syscall_64+0x50/0x90 arch/x86/entry/common.c:359 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f9b8fd85840 Code: Bad RIP value. RSP: 002b:00007ffe56bbd5a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007ffe56bbd718 RCX: 00007f9b8fd85840 RDX: 00007f9b8fd71ea0 RSI: 0000000000000000 RDI: 00007ffe56bbdf23 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 0000565511e988d0 R13: 00007ffe56bbd710 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the page: page:ffffea0007348700 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 flags: 0x200000000000000() raw: 0200000000000000 ffff88821fffabd0 ffff88821fffabd0 0000000000000000 raw: 0000000000000000 0000000000000002 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881cd21c780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881cd21c800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881cd21c880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881cd21c900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881cd21c980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================