usb 3-1: USB disconnect, device number 15 asix 3-1:0.0 eth1: unregister 'asix' usb-dummy_hcd.2-1, ASIX AX88172A USB 2.0 Ethernet ================================================================== BUG: KASAN: use-after-free in ax88172a_remove_mdio drivers/net/usb/ax88172a.c:123 [inline] BUG: KASAN: use-after-free in ax88172a_unbind+0x6a/0xc0 drivers/net/usb/ax88172a.c:274 Read of size 8 at addr ffff8881d7590300 by task kworker/0:4/218 CPU: 0 PID: 218 Comm: kworker/0:4 Not tainted 5.4.41-syzkaller-00234-gb818fc58f06b #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:77 [inline] dump_stack+0x14a/0x1ce lib/dump_stack.c:118 print_address_description+0x93/0x620 mm/kasan/report.c:374 __kasan_report+0x16d/0x1e0 mm/kasan/report.c:506 kasan_report+0x34/0x60 mm/kasan/common.c:634 ax88172a_remove_mdio drivers/net/usb/ax88172a.c:123 [inline] ax88172a_unbind+0x6a/0xc0 drivers/net/usb/ax88172a.c:274 usbnet_disconnect+0x14e/0x340 drivers/net/usb/usbnet.c:1618 usb_unbind_interface+0x1d8/0x850 drivers/usb/core/driver.c:423 __device_release_driver drivers/base/dd.c:1137 [inline] device_release_driver_internal+0x515/0x7b0 drivers/base/dd.c:1168 bus_remove_device+0x2e7/0x350 drivers/base/bus.c:532 device_del+0x7bc/0x1200 drivers/base/core.c:2684 usb_disable_device+0x3f3/0xb80 drivers/usb/core/message.c:1244 usb_disconnect+0x341/0x880 drivers/usb/core/hub.c:2216 hub_port_connect drivers/usb/core/hub.c:4973 [inline] hub_port_connect_change drivers/usb/core/hub.c:5237 [inline] port_event drivers/usb/core/hub.c:5383 [inline] hub_event+0x1c6c/0x4fa0 drivers/usb/core/hub.c:5465 process_one_work+0x777/0xf90 kernel/workqueue.c:2274 worker_thread+0xa8f/0x1430 kernel/workqueue.c:2420 kthread+0x2df/0x300 kernel/kthread.c:255 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 140: save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc+0x12c/0x1c0 mm/kasan/common.c:510 kmem_cache_alloc_trace+0xc3/0x280 mm/slub.c:2793 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:690 [inline] ax88172a_bind+0xc7/0x980 drivers/net/usb/ax88172a.c:191 usbnet_probe+0xa9f/0x2770 drivers/net/usb/usbnet.c:1737 usb_probe_interface+0x631/0xad0 drivers/usb/core/driver.c:361 really_probe+0x764/0xf70 drivers/base/dd.c:555 driver_probe_device+0xe6/0x230 drivers/base/dd.c:724 bus_for_each_drv+0x17a/0x200 drivers/base/bus.c:430 __device_attach+0x27b/0x420 drivers/base/dd.c:897 bus_probe_device+0xbb/0x200 drivers/base/bus.c:490 device_add+0x105a/0x1750 drivers/base/core.c:2507 usb_set_configuration+0x184c/0x1dc0 drivers/usb/core/message.c:2030 generic_probe+0x82/0x140 drivers/usb/core/generic.c:210 really_probe+0x764/0xf70 drivers/base/dd.c:555 driver_probe_device+0xe6/0x230 drivers/base/dd.c:724 bus_for_each_drv+0x17a/0x200 drivers/base/bus.c:430 __device_attach+0x27b/0x420 drivers/base/dd.c:897 bus_probe_device+0xbb/0x200 drivers/base/bus.c:490 device_add+0x105a/0x1750 drivers/base/core.c:2507 usb_new_device+0xda7/0x1710 drivers/usb/core/hub.c:2553 hub_port_connect drivers/usb/core/hub.c:5122 [inline] hub_port_connect_change drivers/usb/core/hub.c:5237 [inline] port_event drivers/usb/core/hub.c:5383 [inline] hub_event+0x2963/0x4fa0 drivers/usb/core/hub.c:5465 process_one_work+0x777/0xf90 kernel/workqueue.c:2274 worker_thread+0xa8f/0x1430 kernel/workqueue.c:2420 kthread+0x2df/0x300 kernel/kthread.c:255 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 Freed by task 140: save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x181/0x230 mm/kasan/common.c:471 slab_free_hook mm/slub.c:1424 [inline] slab_free_freelist_hook+0xd0/0x150 mm/slub.c:1457 slab_free mm/slub.c:3014 [inline] kfree+0x12b/0x600 mm/slub.c:3975 ax88172a_bind+0x844/0x980 drivers/net/usb/ax88172a.c:250 usbnet_probe+0xa9f/0x2770 drivers/net/usb/usbnet.c:1737 usb_probe_interface+0x631/0xad0 drivers/usb/core/driver.c:361 really_probe+0x764/0xf70 drivers/base/dd.c:555 driver_probe_device+0xe6/0x230 drivers/base/dd.c:724 bus_for_each_drv+0x17a/0x200 drivers/base/bus.c:430 __device_attach+0x27b/0x420 drivers/base/dd.c:897 bus_probe_device+0xbb/0x200 drivers/base/bus.c:490 device_add+0x105a/0x1750 drivers/base/core.c:2507 usb_set_configuration+0x184c/0x1dc0 drivers/usb/core/message.c:2030 generic_probe+0x82/0x140 drivers/usb/core/generic.c:210 really_probe+0x764/0xf70 drivers/base/dd.c:555 driver_probe_device+0xe6/0x230 drivers/base/dd.c:724 bus_for_each_drv+0x17a/0x200 drivers/base/bus.c:430 __device_attach+0x27b/0x420 drivers/base/dd.c:897 bus_probe_device+0xbb/0x200 drivers/base/bus.c:490 device_add+0x105a/0x1750 drivers/base/core.c:2507 usb_new_device+0xda7/0x1710 drivers/usb/core/hub.c:2553 hub_port_connect drivers/usb/core/hub.c:5122 [inline] hub_port_connect_change drivers/usb/core/hub.c:5237 [inline] port_event drivers/usb/core/hub.c:5383 [inline] hub_event+0x2963/0x4fa0 drivers/usb/core/hub.c:5465 process_one_work+0x777/0xf90 kernel/workqueue.c:2274 worker_thread+0xa8f/0x1430 kernel/workqueue.c:2420 kthread+0x2df/0x300 kernel/kthread.c:255 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff8881d7590300 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff8881d7590300, ffff8881d7590340) The buggy address belongs to the page: page:ffffea00075d6400 refcount:1 mapcount:0 mapping:ffff8881da803180 index:0x0 flags: 0x8000000000000200(slab) raw: 8000000000000200 ffffea0007354040 0000000e0000000e ffff8881da803180 raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d7590200: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8881d7590280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8881d7590300: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8881d7590380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8881d7590400: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== asix 3-1:0.0 eth1 (unregistered): deregistering mdio bus m/dummy_hcd.2/usb3/3-1/3-1:0.0/net/eth1 BUG: unable to handle page fault for address: 00007fdef78de000 #PF: supervisor instruction fetch in kernel mode #PF: error_code(0x0010) - not-present page PGD 1c4be8067 P4D 1c4be8067 PUD 0 Oops: 0010 [#1] PREEMPT SMP KASAN CPU: 0 PID: 218 Comm: kworker/0:4 Tainted: G B 5.4.41-syzkaller-00234-gb818fc58f06b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: usb_hub_wq hub_event RIP: 0010:0x7fdef78de000 Code: Bad RIP value. RSP: 0018:ffff8881d08b7618 EFLAGS: 00010292 RAX: 8b2b312c2182c600 RBX: ffff8881c7e7cea0 RCX: ffffffff827abe6f RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff8881c7e7cea0 RBP: 0000000000000000 R08: dffffc0000000000 R09: 0000000000000003 R10: ffffed103a116ea5 R11: 0000000000000004 R12: dffffc0000000000 R13: ffff8881d5d31880 R14: ffff8881d5d31480 R15: ffff8881c7e7daf0 FS: 0000000000000000(0000) GS:ffff8881db800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fdef78ddfd6 CR3: 00000001d149b006 CR4: 00000000001606f0 DR0: 0000000020000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 Call Trace: Modules linked in: CR2: 00007fdef78de000 ---[ end trace c2aabd6dc8427a23 ]--- RIP: 0010:0x7fdef78de000 Code: Bad RIP value. RSP: 0018:ffff8881d08b7618 EFLAGS: 00010292 RAX: 8b2b312c2182c600 RBX: ffff8881c7e7cea0 RCX: ffffffff827abe6f RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff8881c7e7cea0 RBP: 0000000000000000 R08: dffffc0000000000 R09: 0000000000000003 R10: ffffed103a116ea5 R11: 0000000000000004 R12: dffffc0000000000 R13: ffff8881d5d31880 R14: ffff8881d5d31480 R15: ffff8881c7e7daf0 FS: 0000000000000000(0000) GS:ffff8881db800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fdef78ddfd6 CR3: 00000001d149b006 CR4: 00000000001606f0 DR0: 0000000020000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600