dvb-usb: TeVii S632 USB successfully initialized and connected. usb 1-1: USB disconnect, device number 114 ================================================================== BUG: KASAN: use-after-free in dvb_usb_device_exit+0x274/0x280 drivers/media/usb/dvb-usb/dvb-usb-init.c:305 Read of size 8 at addr ffff888113dae3e0 by task kworker/1:3/8011 CPU: 1 PID: 8011 Comm: kworker/1:3 Not tainted 5.11.0-rc1-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+0x107/0x163 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:230 __kasan_report mm/kasan/report.c:396 [inline] kasan_report.cold+0x79/0xd5 mm/kasan/report.c:413 dvb_usb_device_exit+0x274/0x280 drivers/media/usb/dvb-usb/dvb-usb-init.c:305 usb_unbind_interface+0x1d8/0x8d0 drivers/usb/core/driver.c:458 __device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1161 device_release_driver_internal drivers/base/dd.c:1192 [inline] device_release_driver+0x26/0x40 drivers/base/dd.c:1215 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533 device_del+0x502/0xd40 drivers/base/core.c:3270 usb_disable_device+0x35b/0x7b0 drivers/usb/core/message.c:1413 usb_disconnect.cold+0x27d/0x780 drivers/usb/core/hub.c:2218 hub_port_connect drivers/usb/core/hub.c:5074 [inline] hub_port_connect_change drivers/usb/core/hub.c:5363 [inline] port_event drivers/usb/core/hub.c:5509 [inline] hub_event+0x1c8a/0x42d0 drivers/usb/core/hub.c:5591 process_one_work+0x98d/0x1580 kernel/workqueue.c:2275 process_scheduled_works kernel/workqueue.c:2337 [inline] worker_thread+0x82b/0x1120 kernel/workqueue.c:2423 kthread+0x38c/0x460 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 Allocated by task 8011: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:401 [inline] ____kasan_kmalloc.constprop.0+0x82/0xa0 mm/kasan/common.c:429 kasan_slab_alloc include/linux/kasan.h:205 [inline] slab_post_alloc_hook mm/slab.h:512 [inline] slab_alloc_node mm/slub.c:2892 [inline] slab_alloc mm/slub.c:2900 [inline] __kmalloc_track_caller+0x14c/0x2e0 mm/slub.c:4465 kmemdup+0x23/0x50 mm/util.c:128 kmemdup include/linux/string.h:520 [inline] dw2102_probe+0x57c/0xb10 drivers/media/usb/dvb-usb/dw2102.c:2436 usb_probe_interface+0x315/0x7f0 drivers/usb/core/driver.c:396 really_probe+0x291/0xde0 drivers/base/dd.c:561 driver_probe_device+0x26b/0x3d0 drivers/base/dd.c:745 __device_attach_driver+0x1d1/0x290 drivers/base/dd.c:851 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4a0 drivers/base/dd.c:919 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbc4/0x1d90 drivers/base/core.c:3091 usb_set_configuration+0x113c/0x1910 drivers/usb/core/message.c:2164 usb_generic_driver_probe+0xba/0x100 drivers/usb/core/generic.c:238 usb_probe_device+0xd9/0x2c0 drivers/usb/core/driver.c:293 really_probe+0x291/0xde0 drivers/base/dd.c:561 driver_probe_device+0x26b/0x3d0 drivers/base/dd.c:745 __device_attach_driver+0x1d1/0x290 drivers/base/dd.c:851 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4a0 drivers/base/dd.c:919 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbc4/0x1d90 drivers/base/core.c:3091 usb_new_device.cold+0x725/0x1057 drivers/usb/core/hub.c:2555 hub_port_connect drivers/usb/core/hub.c:5223 [inline] hub_port_connect_change drivers/usb/core/hub.c:5363 [inline] port_event drivers/usb/core/hub.c:5509 [inline] hub_event+0x2348/0x42d0 drivers/usb/core/hub.c:5591 process_one_work+0x98d/0x1580 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x38c/0x460 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 Freed by task 8011: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:354 ____kasan_slab_free+0xe1/0x110 mm/kasan/common.c:362 kasan_slab_free include/linux/kasan.h:188 [inline] slab_free_hook mm/slub.c:1547 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1580 slab_free mm/slub.c:3143 [inline] kfree+0xdb/0x390 mm/slub.c:4125 dw2102_probe+0x782/0xb10 drivers/media/usb/dvb-usb/dw2102.c:2470 usb_probe_interface+0x315/0x7f0 drivers/usb/core/driver.c:396 really_probe+0x291/0xde0 drivers/base/dd.c:561 driver_probe_device+0x26b/0x3d0 drivers/base/dd.c:745 __device_attach_driver+0x1d1/0x290 drivers/base/dd.c:851 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4a0 drivers/base/dd.c:919 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbc4/0x1d90 drivers/base/core.c:3091 usb_set_configuration+0x113c/0x1910 drivers/usb/core/message.c:2164 usb_generic_driver_probe+0xba/0x100 drivers/usb/core/generic.c:238 usb_probe_device+0xd9/0x2c0 drivers/usb/core/driver.c:293 really_probe+0x291/0xde0 drivers/base/dd.c:561 driver_probe_device+0x26b/0x3d0 drivers/base/dd.c:745 __device_attach_driver+0x1d1/0x290 drivers/base/dd.c:851 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4a0 drivers/base/dd.c:919 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbc4/0x1d90 drivers/base/core.c:3091 usb_new_device.cold+0x725/0x1057 drivers/usb/core/hub.c:2555 hub_port_connect drivers/usb/core/hub.c:5223 [inline] hub_port_connect_change drivers/usb/core/hub.c:5363 [inline] port_event drivers/usb/core/hub.c:5509 [inline] hub_event+0x2348/0x42d0 drivers/usb/core/hub.c:5591 process_one_work+0x98d/0x1580 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x38c/0x460 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 The buggy address belongs to the object at ffff888113dae000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 992 bytes inside of 4096-byte region [ffff888113dae000, ffff888113daf000) The buggy address belongs to the page: page:00000000d0da3b13 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x113da8 head:00000000d0da3b13 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x200000000010200(slab|head) raw: 0200000000010200 0000000000000000 0000000100000001 ffff888100042140 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888113dae280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888113dae300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888113dae380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888113dae400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888113dae480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================