================================================================== BUG: KASAN: use-after-free in worker_thread+0xa36/0x1260 kernel/workqueue.c:2444 Read of size 8 at addr ffff888117a6ace0 by task kworker/1:2/349 CPU: 1 PID: 349 Comm: kworker/1:2 Not tainted 6.1.129-syzkaller-1168449-gc1fd50266bd6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Workqueue: 0x0 (events) Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0x158/0x4e0 mm/kasan/report.c:427 kasan_report+0x13c/0x170 mm/kasan/report.c:531 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:351 worker_thread+0xa36/0x1260 kernel/workqueue.c:2444 kthread+0x26d/0x300 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 24: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:379 [inline] __kasan_kmalloc+0x9c/0xb0 mm/kasan/common.c:388 kasan_kmalloc include/linux/kasan.h:212 [inline] __do_kmalloc_node mm/slab_common.c:938 [inline] __kmalloc_node+0xb4/0x1e0 mm/slab_common.c:945 kmalloc_node include/linux/slab.h:589 [inline] kvmalloc_node+0x221/0x640 mm/util.c:592 kvmalloc include/linux/slab.h:716 [inline] kvzalloc include/linux/slab.h:724 [inline] alloc_netdev_mqs+0x8c/0xf90 net/core/dev.c:10649 alloc_etherdev_mqs+0x36/0x40 net/ethernet/eth.c:384 usbnet_probe+0x213/0x28a0 drivers/net/usb/usbnet.c:1709 usb_probe_interface+0x5b6/0xa90 drivers/usb/core/driver.c:397 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2b8/0x920 drivers/base/dd.c:639 __driver_probe_device+0x1a0/0x310 drivers/base/dd.c:808 driver_probe_device+0x54/0x3d0 drivers/base/dd.c:838 __device_attach_driver+0x2e3/0x490 drivers/base/dd.c:966 bus_for_each_drv+0x183/0x200 drivers/base/bus.c:429 __device_attach+0x312/0x510 drivers/base/dd.c:1038 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1087 bus_probe_device+0xbe/0x1e0 drivers/base/bus.c:489 device_add+0xb60/0xf10 drivers/base/core.c:3697 usb_set_configuration+0x190f/0x1e80 drivers/usb/core/message.c:2165 usb_generic_driver_probe+0x8b/0x150 drivers/usb/core/generic.c:238 usb_probe_device+0x144/0x260 drivers/usb/core/driver.c:294 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2b8/0x920 drivers/base/dd.c:639 __driver_probe_device+0x1a0/0x310 drivers/base/dd.c:808 driver_probe_device+0x54/0x3d0 drivers/base/dd.c:838 __device_attach_driver+0x2e3/0x490 drivers/base/dd.c:966 bus_for_each_drv+0x183/0x200 drivers/base/bus.c:429 __device_attach+0x312/0x510 drivers/base/dd.c:1038 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1087 bus_probe_device+0xbe/0x1e0 drivers/base/bus.c:489 device_add+0xb60/0xf10 drivers/base/core.c:3697 usb_new_device+0xf2f/0x1820 drivers/usb/core/hub.c:2656 hub_port_connect drivers/usb/core/hub.c:5566 [inline] hub_port_connect_change drivers/usb/core/hub.c:5706 [inline] port_event drivers/usb/core/hub.c:5866 [inline] hub_event+0x2db1/0x4830 drivers/usb/core/hub.c:5948 process_one_work+0x73d/0xcb0 kernel/workqueue.c:2299 worker_thread+0xa60/0x1260 kernel/workqueue.c:2446 kthread+0x26d/0x300 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Freed by task 24: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0x131/0x180 mm/kasan/common.c:241 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:249 kasan_slab_free include/linux/kasan.h:178 [inline] slab_free_hook mm/slub.c:1745 [inline] slab_free_freelist_hook mm/slub.c:1771 [inline] slab_free mm/slub.c:3686 [inline] __kmem_cache_free+0x21d/0x410 mm/slub.c:3702 kfree+0x7a/0xf0 mm/slab_common.c:990 kvfree+0x35/0x40 mm/util.c:639 netdev_freemem+0x3f/0x60 net/core/dev.c:10603 netdev_release+0x7f/0xb0 net/core/net-sysfs.c:1904 device_release+0x95/0x1c0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:681 [inline] kobject_release lib/kobject.c:712 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x178/0x260 lib/kobject.c:729 put_device+0x1f/0x30 drivers/base/core.c:3805 free_netdev+0x393/0x480 net/core/dev.c:10796 usbnet_disconnect+0x25f/0x3b0 drivers/net/usb/usbnet.c:1648 usb_unbind_interface+0x1fa/0x8c0 drivers/usb/core/driver.c:459 device_remove drivers/base/dd.c:550 [inline] __device_release_driver drivers/base/dd.c:1283 [inline] device_release_driver_internal+0x53e/0x870 drivers/base/dd.c:1309 device_release_driver+0x19/0x20 drivers/base/dd.c:1332 bus_remove_device+0x2fa/0x360 drivers/base/bus.c:531 device_del+0x663/0xe90 drivers/base/core.c:3885 usb_disable_device+0x380/0x720 drivers/usb/core/message.c:1414 usb_disconnect+0x32a/0x890 drivers/usb/core/hub.c:2311 hub_port_connect drivers/usb/core/hub.c:5405 [inline] hub_port_connect_change drivers/usb/core/hub.c:5706 [inline] port_event drivers/usb/core/hub.c:5866 [inline] hub_event+0x1ed8/0x4830 drivers/usb/core/hub.c:5948 process_one_work+0x73d/0xcb0 kernel/workqueue.c:2299 process_scheduled_works kernel/workqueue.c:2362 [inline] worker_thread+0xd71/0x1260 kernel/workqueue.c:2448 kthread+0x26d/0x300 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb4/0xc0 mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:496 insert_work+0x56/0x310 kernel/workqueue.c:1368 __queue_work+0x9b6/0xd70 kernel/workqueue.c:1527 queue_work_on+0x105/0x170 kernel/workqueue.c:1555 usbnet_link_change+0x182/0x1a0 drivers/net/usb/usbnet.c:-1 usbnet_probe+0x1e1e/0x28a0 drivers/net/usb/usbnet.c:1856 usb_probe_interface+0x5b6/0xa90 drivers/usb/core/driver.c:397 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2b8/0x920 drivers/base/dd.c:639 __driver_probe_device+0x1a0/0x310 drivers/base/dd.c:808 driver_probe_device+0x54/0x3d0 drivers/base/dd.c:838 __device_attach_driver+0x2e3/0x490 drivers/base/dd.c:966 bus_for_each_drv+0x183/0x200 drivers/base/bus.c:429 __device_attach+0x312/0x510 drivers/base/dd.c:1038 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1087 bus_probe_device+0xbe/0x1e0 drivers/base/bus.c:489 device_add+0xb60/0xf10 drivers/base/core.c:3697 usb_set_configuration+0x190f/0x1e80 drivers/usb/core/message.c:2165 usb_generic_driver_probe+0x8b/0x150 drivers/usb/core/generic.c:238 usb_probe_device+0x144/0x260 drivers/usb/core/driver.c:294 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2b8/0x920 drivers/base/dd.c:639 __driver_probe_device+0x1a0/0x310 drivers/base/dd.c:808 driver_probe_device+0x54/0x3d0 drivers/base/dd.c:838 __device_attach_driver+0x2e3/0x490 drivers/base/dd.c:966 bus_for_each_drv+0x183/0x200 drivers/base/bus.c:429 __device_attach+0x312/0x510 drivers/base/dd.c:1038 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1087 bus_probe_device+0xbe/0x1e0 drivers/base/bus.c:489 device_add+0xb60/0xf10 drivers/base/core.c:3697 usb_new_device+0xf2f/0x1820 drivers/usb/core/hub.c:2656 hub_port_connect drivers/usb/core/hub.c:5566 [inline] hub_port_connect_change drivers/usb/core/hub.c:5706 [inline] port_event drivers/usb/core/hub.c:5866 [inline] hub_event+0x2db1/0x4830 drivers/usb/core/hub.c:5948 process_one_work+0x73d/0xcb0 kernel/workqueue.c:2299 worker_thread+0xa60/0x1260 kernel/workqueue.c:2446 kthread+0x26d/0x300 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888117a6a000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 3296 bytes inside of 4096-byte region [ffff888117a6a000, ffff888117a6b000) The buggy address belongs to the physical page: page:ffffea00045e9a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x117a68 head:ffffea00045e9a00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 ffffea00045d6600 dead000000000002 ffff888100043380 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 419, tgid 419 (syz-executor), ts 50953471527, free_ts 50634418578 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x213/0x220 mm/page_alloc.c:2637 prep_new_page+0x1b/0x110 mm/page_alloc.c:2644 get_page_from_freelist+0x3a98/0x3b10 mm/page_alloc.c:4539 __alloc_pages+0x234/0x610 mm/page_alloc.c:5837 alloc_slab_page+0x6c/0xf0 include/linux/gfp.h:-1 allocate_slab mm/slub.c:1962 [inline] new_slab+0x90/0x3e0 mm/slub.c:2015 ___slab_alloc+0x6f9/0xb80 mm/slub.c:3203 __slab_alloc+0x5d/0xa0 mm/slub.c:3302 slab_alloc_node mm/slub.c:3387 [inline] __kmem_cache_alloc_node+0x207/0x2a0 mm/slub.c:3462 __do_kmalloc_node mm/slab_common.c:937 [inline] __kmalloc_node_track_caller+0xa2/0x1e0 mm/slab_common.c:958 kmalloc_reserve net/core/skbuff.c:446 [inline] __alloc_skb+0x125/0x2d0 net/core/skbuff.c:515 alloc_skb include/linux/skbuff.h:1290 [inline] nlmsg_new include/net/netlink.h:991 [inline] rtmsg_ifinfo_build_skb+0x7f/0x180 net/core/rtnetlink.c:3963 rtmsg_ifinfo_event net/core/rtnetlink.c:3999 [inline] rtmsg_ifinfo+0x78/0x120 net/core/rtnetlink.c:4008 register_netdevice+0x11cf/0x1490 net/core/dev.c:10172 register_netdev+0x3c/0x50 net/core/dev.c:10251 vti6_init_net+0x2b8/0x3e0 net/ipv6/ip6_vti.c:1164 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1545 [inline] free_pcp_prepare mm/page_alloc.c:1619 [inline] free_unref_page_prepare+0x9f1/0xa00 mm/page_alloc.c:3581 free_unref_page+0xb2/0x5c0 mm/page_alloc.c:3677 free_the_page mm/page_alloc.c:830 [inline] free_compound_page+0x9d/0xd0 mm/page_alloc.c:853 destroy_large_folio+0x56/0x90 mm/page_alloc.c:890 __folio_put_large mm/swap.c:110 [inline] __folio_put+0xcf/0xe0 mm/swap.c:118 folio_put include/linux/mm.h:1431 [inline] put_page include/linux/mm.h:1483 [inline] __skb_frag_unref include/linux/skbuff.h:3455 [inline] skb_release_data+0x3c1/0x840 net/core/skbuff.c:785 skb_release_all net/core/skbuff.c:856 [inline] __kfree_skb+0x50/0x70 net/core/skbuff.c:870 tcp_wmem_free_skb include/net/tcp.h:305 [inline] tcp_rtx_queue_unlink_and_free+0x3d5/0x610 include/net/tcp.h:1960 tcp_clean_rtx_queue net/ipv4/tcp_input.c:3400 [inline] tcp_ack+0x2437/0x6a30 net/ipv4/tcp_input.c:3959 tcp_rcv_established+0xe31/0x1c60 net/ipv4/tcp_input.c:6006 tcp_v4_do_rcv+0x430/0xa20 net/ipv4/tcp_ipv4.c:1683 sk_backlog_rcv include/net/sock.h:1131 [inline] __release_sock+0x145/0x410 net/core/sock.c:2945 __sk_flush_backlog+0x26/0x40 net/core/sock.c:2965 sk_flush_backlog include/net/sock.h:1231 [inline] tcp_sendmsg_locked+0x3048/0x4000 net/ipv4/tcp.c:1326 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1488 inet_sendmsg+0xa1/0xc0 net/ipv4/af_inet.c:835 Memory state around the buggy address: ffff888117a6ab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888117a6ac00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888117a6ac80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888117a6ad00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888117a6ad80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================