asix 1-1:0.0 eth1: register 'asix' at usb-dummy_hcd.0-1, ASIX AX88172A USB 2.0 Ethernet, 56:e5:76:48:89:61 usb 1-1: USB disconnect, device number 2 asix 1-1:0.0 eth1: unregister 'asix' usb-dummy_hcd.0-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 ffff8881ce38a500 by task kworker/0:1/12 CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 5.4.47-syzkaller-00290-g5eb96e454e88 #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:1142 [inline] device_release_driver_internal+0x515/0x7b0 drivers/base/dd.c:1173 bus_remove_device+0x2e7/0x350 drivers/base/bus.c:532 device_del+0x7bc/0x1200 drivers/base/core.c:2821 usb_disable_device+0x3fe/0xc90 drivers/usb/core/message.c:1244 usb_disconnect+0x341/0x880 drivers/usb/core/hub.c:2217 hub_port_connect drivers/usb/core/hub.c:4974 [inline] hub_port_connect_change drivers/usb/core/hub.c:5238 [inline] port_event drivers/usb/core/hub.c:5384 [inline] hub_event+0x1c6c/0x4fa0 drivers/usb/core/hub.c:5466 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 12: 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:560 driver_probe_device+0xe6/0x230 drivers/base/dd.c:729 bus_for_each_drv+0x17a/0x200 drivers/base/bus.c:430 __device_attach+0x27b/0x420 drivers/base/dd.c:902 bus_probe_device+0xbb/0x200 drivers/base/bus.c:490 device_add+0x13db/0x17c0 drivers/base/core.c:2644 usb_set_configuration+0x197f/0x1f00 drivers/usb/core/message.c:2030 generic_probe+0x82/0x140 drivers/usb/core/generic.c:210 really_probe+0x764/0xf70 drivers/base/dd.c:560 driver_probe_device+0xe6/0x230 drivers/base/dd.c:729 bus_for_each_drv+0x17a/0x200 drivers/base/bus.c:430 __device_attach+0x27b/0x420 drivers/base/dd.c:902 bus_probe_device+0xbb/0x200 drivers/base/bus.c:490 device_add+0x13db/0x17c0 drivers/base/core.c:2644 usb_new_device+0xda7/0x1710 drivers/usb/core/hub.c:2554 hub_port_connect drivers/usb/core/hub.c:5123 [inline] hub_port_connect_change drivers/usb/core/hub.c:5238 [inline] port_event drivers/usb/core/hub.c:5384 [inline] hub_event+0x2963/0x4fa0 drivers/usb/core/hub.c:5466 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 12: 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:560 driver_probe_device+0xe6/0x230 drivers/base/dd.c:729 bus_for_each_drv+0x17a/0x200 drivers/base/bus.c:430 __device_attach+0x27b/0x420 drivers/base/dd.c:902 bus_probe_device+0xbb/0x200 drivers/base/bus.c:490 device_add+0x13db/0x17c0 drivers/base/core.c:2644 usb_set_configuration+0x197f/0x1f00 drivers/usb/core/message.c:2030 generic_probe+0x82/0x140 drivers/usb/core/generic.c:210 really_probe+0x764/0xf70 drivers/base/dd.c:560 driver_probe_device+0xe6/0x230 drivers/base/dd.c:729 bus_for_each_drv+0x17a/0x200 drivers/base/bus.c:430 __device_attach+0x27b/0x420 drivers/base/dd.c:902 bus_probe_device+0xbb/0x200 drivers/base/bus.c:490 device_add+0x13db/0x17c0 drivers/base/core.c:2644 usb_new_device+0xda7/0x1710 drivers/usb/core/hub.c:2554 hub_port_connect drivers/usb/core/hub.c:5123 [inline] hub_port_connect_change drivers/usb/core/hub.c:5238 [inline] port_event drivers/usb/core/hub.c:5384 [inline] hub_event+0x2963/0x4fa0 drivers/usb/core/hub.c:5466 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 ffff8881ce38a500 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff8881ce38a500, ffff8881ce38a540) The buggy address belongs to the page: page:ffffea000738e280 refcount:1 mapcount:0 mapping:ffff8881da803180 index:0xffff8881ce38ac80 flags: 0x8000000000000200(slab) raw: 8000000000000200 ffffea000738e1c0 0000000700000007 ffff8881da803180 raw: ffff8881ce38ac80 0000000080200010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881ce38a400: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8881ce38a480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8881ce38a500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8881ce38a580: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8881ce38a600: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== ------------[ cut here ]------------ kernel BUG at drivers/net/phy/mdio_bus.c:456! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 12 Comm: kworker/0:1 Tainted: G B 5.4.47-syzkaller-00290-g5eb96e454e88 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: usb_hub_wq hub_event RIP: 0010:mdiobus_unregister+0x1da/0x1e0 drivers/net/phy/mdio_bus.c:456 Code: f4 fe e9 80 fe ff ff 44 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 94 fe ff ff 4c 89 ff e8 e0 db f4 fe e9 87 fe ff ff e8 16 b0 c6 fe <0f> 0b 0f 1f 40 00 41 57 41 56 41 55 41 54 53 49 89 ff 49 bc 00 00 RSP: 0018:ffff8881da9df620 EFLAGS: 00010293 RAX: ffffffff827b4caa RBX: 00000000725f7261 RCX: ffff8881da9b9f00 RDX: 0000000000000000 RSI: 00000000725f7261 RDI: 0000000000000002 RBP: 1ffff11039c715c3 R08: ffffffff827b4b16 R09: ffffed103b705df0 R10: ffffed103b705df0 R11: 0000000000000000 R12: dffffc0000000000 R13: dffffc0000000000 R14: ffff8881ce38ad80 R15: ffff8881ce38ae18 FS: 0000000000000000(0000) GS:ffff8881db800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f814ae93000 CR3: 00000001d36cb002 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ax88172a_remove_mdio drivers/net/usb/ax88172a.c:124 [inline] ax88172a_unbind+0x99/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:1142 [inline] device_release_driver_internal+0x515/0x7b0 drivers/base/dd.c:1173 bus_remove_device+0x2e7/0x350 drivers/base/bus.c:532 device_del+0x7bc/0x1200 drivers/base/core.c:2821 usb_disable_device+0x3fe/0xc90 drivers/usb/core/message.c:1244 usb_disconnect+0x341/0x880 drivers/usb/core/hub.c:2217 hub_port_connect drivers/usb/core/hub.c:4974 [inline] hub_port_connect_change drivers/usb/core/hub.c:5238 [inline] port_event drivers/usb/core/hub.c:5384 [inline] hub_event+0x1c6c/0x4fa0 drivers/usb/core/hub.c:5466 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 Modules linked in: ---[ end trace 100ac8b1bcd3041d ]--- RIP: 0010:mdiobus_unregister+0x1da/0x1e0 drivers/net/phy/mdio_bus.c:456 Code: f4 fe e9 80 fe ff ff 44 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 94 fe ff ff 4c 89 ff e8 e0 db f4 fe e9 87 fe ff ff e8 16 b0 c6 fe <0f> 0b 0f 1f 40 00 41 57 41 56 41 55 41 54 53 49 89 ff 49 bc 00 00 RSP: 0018:ffff8881da9df620 EFLAGS: 00010293 RAX: ffffffff827b4caa RBX: 00000000725f7261 RCX: ffff8881da9b9f00 RDX: 0000000000000000 RSI: 00000000725f7261 RDI: 0000000000000002 RBP: 1ffff11039c715c3 R08: ffffffff827b4b16 R09: ffffed103b705df0 R10: ffffed103b705df0 R11: 0000000000000000 R12: dffffc0000000000 R13: dffffc0000000000 R14: ffff8881ce38ad80 R15: ffff8881ce38ae18 FS: 0000000000000000(0000) GS:ffff8881db800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f814ae99000 CR3: 00000001d36cb002 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400