input: TeVii S421 PCI as /devices/platform/dummy_hcd.0/usb1/1-1/rc/rc0/input5 dvb-usb: schedule remote query interval to 150 msecs. dw2102: su3000_power_ctrl: 0, initialized 1 dvb-usb: TeVii S421 PCI successfully initialized and connected. usb 1-1: USB disconnect, device number 2 ================================================================== BUG: KASAN: use-after-free in dvb_usb_device_exit+0xd2/0x120 drivers/media/usb/dvb-usb/dvb-usb-init.c:305 Read of size 8 at addr ffff8881413622e8 by task kworker/0:3/3151 CPU: 0 PID: 3151 Comm: kworker/0:3 Not tainted 5.12.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x176/0x24e lib/dump_stack.c:120 print_address_description+0x5f/0x3a0 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report+0x15c/0x200 mm/kasan/report.c:416 dvb_usb_device_exit+0xd2/0x120 drivers/media/usb/dvb-usb/dvb-usb-init.c:305 usb_unbind_interface+0x1f2/0x860 drivers/usb/core/driver.c:458 __device_release_driver drivers/base/dd.c:1159 [inline] device_release_driver_internal+0x51e/0x7b0 drivers/base/dd.c:1190 bus_remove_device+0x300/0x420 drivers/base/bus.c:533 device_del+0x5e1/0xa90 drivers/base/core.c:3421 usb_disable_device+0x407/0x800 drivers/usb/core/message.c:1413 usb_disconnect+0x33a/0x8a0 drivers/usb/core/hub.c:2218 hub_port_connect+0x214/0x25b0 drivers/usb/core/hub.c:5074 hub_port_connect_change+0x5c6/0xab0 drivers/usb/core/hub.c:5363 port_event+0xa6f/0x10b0 drivers/usb/core/hub.c:5509 hub_event+0x417/0xcb0 drivers/usb/core/hub.c:5591 process_one_work+0x789/0xfd0 kernel/workqueue.c:2275 process_scheduled_works kernel/workqueue.c:2337 [inline] worker_thread+0xe28/0x1300 kernel/workqueue.c:2423 kthread+0x39a/0x3c0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 6402: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:427 [inline] ____kasan_kmalloc+0xc2/0xf0 mm/kasan/common.c:506 kasan_kmalloc include/linux/kasan.h:233 [inline] __kmalloc+0xb4/0x380 mm/slub.c:4055 kmalloc include/linux/slab.h:559 [inline] tomoyo_realpath_from_path+0xd8/0x610 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x191/0x570 security/tomoyo/file.c:822 security_inode_getattr+0xc0/0x140 security/security.c:1288 vfs_getattr fs/stat.c:131 [inline] vfs_statx+0xe8/0x320 fs/stat.c:199 vfs_fstatat fs/stat.c:217 [inline] vfs_lstat include/linux/fs.h:3240 [inline] __do_sys_newlstat fs/stat.c:372 [inline] __se_sys_newlstat fs/stat.c:366 [inline] __x64_sys_newlstat+0x81/0xd0 fs/stat.c:366 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 3151: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x3d/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:357 ____kasan_slab_free+0x100/0x140 mm/kasan/common.c:360 kasan_slab_free include/linux/kasan.h:199 [inline] slab_free_hook mm/slub.c:1562 [inline] slab_free_freelist_hook+0x171/0x270 mm/slub.c:1600 slab_free mm/slub.c:3161 [inline] kfree+0xcf/0x2d0 mm/slub.c:4213 dw2102_probe+0x5b3/0x620 drivers/media/usb/dvb-usb/dw2102.c:2465 usb_probe_interface+0x632/0xb30 drivers/usb/core/driver.c:396 really_probe+0x4ab/0x13d0 drivers/base/dd.c:561 driver_probe_device+0x15a/0x310 drivers/base/dd.c:743 bus_for_each_drv+0x108/0x170 drivers/base/bus.c:431 __device_attach+0x2cb/0x480 drivers/base/dd.c:917 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:491 device_add+0x1240/0x1670 drivers/base/core.c:3242 usb_set_configuration+0x1a86/0x2100 drivers/usb/core/message.c:2164 usb_generic_driver_probe+0x83/0x140 drivers/usb/core/generic.c:238 usb_probe_device+0x13a/0x260 drivers/usb/core/driver.c:293 really_probe+0x4ab/0x13d0 drivers/base/dd.c:561 driver_probe_device+0x15a/0x310 drivers/base/dd.c:743 bus_for_each_drv+0x108/0x170 drivers/base/bus.c:431 __device_attach+0x2cb/0x480 drivers/base/dd.c:917 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:491 device_add+0x1240/0x1670 drivers/base/core.c:3242 usb_new_device+0xcda/0x1730 drivers/usb/core/hub.c:2555 hub_port_connect+0xffb/0x25b0 drivers/usb/core/hub.c:5223 hub_port_connect_change+0x5c6/0xab0 drivers/usb/core/hub.c:5363 port_event+0xa6f/0x10b0 drivers/usb/core/hub.c:5509 hub_event+0x417/0xcb0 drivers/usb/core/hub.c:5591 process_one_work+0x789/0xfd0 kernel/workqueue.c:2275 worker_thread+0xac1/0x1300 kernel/workqueue.c:2421 kthread+0x39a/0x3c0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the object at ffff888141362000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 744 bytes inside of 4096-byte region [ffff888141362000, ffff888141363000) The buggy address belongs to the page: page:ffffea000504d800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x141360 head:ffffea000504d800 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x57ff00000010200(slab|head) raw: 057ff00000010200 dead000000000100 dead000000000122 ffff888010842140 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888141362180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888141362200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888141362280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888141362300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888141362380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================