hid-generic 03FF:0000:0006.0138: unknown main item tag 0x0 hid-generic 03FF:0000:0006.0138: unknown main item tag 0x0 hid-generic 03FF:0000:0006.0138: hidraw0: HID v800000.03 Device [syz1] on syz0 ================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0xa6/0x120 lib/list_debug.c:62 Read of size 8 at addr ffff888104deec68 by task kworker/0:16/11061 CPU: 0 PID: 11061 Comm: kworker/0:16 Not tainted 5.10.226-syzkaller-00709-ge5e5644ea27f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: rcu_gp process_srcu Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309 __list_del_entry_valid+0xa6/0x120 lib/list_debug.c:62 __list_del_entry include/linux/list.h:132 [inline] list_del_init include/linux/list.h:204 [inline] process_one_work+0x43f/0xbd0 kernel/workqueue.c:2245 worker_thread+0xaea/0x1510 kernel/workqueue.c:2447 kthread+0x34b/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Allocated by task 11906: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] ____kasan_kmalloc+0xdb/0x110 mm/kasan/common.c:509 __kasan_kmalloc+0x9/0x10 mm/kasan/common.c:518 kasan_kmalloc include/linux/kasan.h:254 [inline] __kmalloc+0x1aa/0x330 mm/slub.c:4033 __kmalloc_node include/linux/slab.h:418 [inline] kmalloc_node include/linux/slab.h:575 [inline] kvmalloc_node+0x82/0x130 mm/util.c:612 kvmalloc include/linux/mm.h:822 [inline] kvzalloc include/linux/mm.h:830 [inline] alloc_netdev_mqs+0x8e/0xcd0 net/core/dev.c:10507 alloc_etherdev_mqs+0x33/0x40 net/ethernet/eth.c:388 usbnet_probe+0x1fc/0x2860 drivers/net/usb/usbnet.c:1661 usb_probe_interface+0x5b6/0xa90 drivers/usb/core/driver.c:397 really_probe+0x3eb/0xaf0 drivers/base/dd.c:562 driver_probe_device+0xfd/0x260 drivers/base/dd.c:752 __device_attach_driver+0x29b/0x410 drivers/base/dd.c:863 bus_for_each_drv+0x183/0x200 drivers/base/bus.c:431 __device_attach+0x30a/0x500 drivers/base/dd.c:932 device_initial_probe+0x1a/0x20 drivers/base/dd.c:981 bus_probe_device+0xbe/0x1e0 drivers/base/bus.c:491 device_add+0x889/0xbc0 drivers/base/core.c:3276 usb_set_configuration+0x19a5/0x1f30 drivers/usb/core/message.c:2160 usb_generic_driver_probe+0x8b/0x150 drivers/usb/core/generic.c:238 usb_probe_device+0x144/0x260 drivers/usb/core/driver.c:294 really_probe+0x3eb/0xaf0 drivers/base/dd.c:562 driver_probe_device+0xfd/0x260 drivers/base/dd.c:752 __device_attach_driver+0x29b/0x410 drivers/base/dd.c:863 bus_for_each_drv+0x183/0x200 drivers/base/bus.c:431 __device_attach+0x30a/0x500 drivers/base/dd.c:932 device_initial_probe+0x1a/0x20 drivers/base/dd.c:981 bus_probe_device+0xbe/0x1e0 drivers/base/bus.c:491 device_add+0x889/0xbc0 drivers/base/core.c:3276 usb_new_device+0xbbc/0x1760 drivers/usb/core/hub.c:2615 hub_port_connect drivers/usb/core/hub.c:5457 [inline] hub_port_connect_change drivers/usb/core/hub.c:5597 [inline] port_event drivers/usb/core/hub.c:5747 [inline] hub_event+0x2d3b/0x47c0 drivers/usb/core/hub.c:5829 process_one_work+0x6dc/0xbd0 kernel/workqueue.c:2301 worker_thread+0xaea/0x1510 kernel/workqueue.c:2447 kthread+0x34b/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Freed by task 18525: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x121/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1595 [inline] slab_free_freelist_hook+0xc0/0x190 mm/slub.c:1621 slab_free mm/slub.c:3203 [inline] kfree+0xc3/0x270 mm/slub.c:4191 kvfree+0x35/0x40 mm/util.c:647 netdev_freemem+0x3f/0x60 net/core/dev.c:10461 netdev_release+0x7f/0xb0 net/core/net-sysfs.c:1886 device_release+0x95/0x1c0 kobject_cleanup lib/kobject.c:713 [inline] kobject_release lib/kobject.c:744 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x178/0x260 lib/kobject.c:761 put_device+0x1f/0x30 drivers/base/core.c:3375 free_netdev+0x384/0x470 net/core/dev.c:10638 usbnet_disconnect+0x242/0x3a0 drivers/net/usb/usbnet.c:1600 usb_unbind_interface+0x1fa/0x8c0 drivers/usb/core/driver.c:459 device_release_driver_internal+0x506/0x7c0 drivers/base/dd.c:1221 device_release_driver+0x19/0x20 drivers/base/dd.c:1244 bus_remove_device+0x2f8/0x360 drivers/base/bus.c:533 device_del+0x68b/0xf00 drivers/base/core.c:3455 usb_disable_device+0x380/0x720 drivers/usb/core/message.c:1411 usb_disconnect+0x32a/0x890 drivers/usb/core/hub.c:2271 hub_port_connect drivers/usb/core/hub.c:5296 [inline] hub_port_connect_change drivers/usb/core/hub.c:5597 [inline] port_event drivers/usb/core/hub.c:5747 [inline] hub_event+0x1e73/0x47c0 drivers/usb/core/hub.c:5829 process_one_work+0x6dc/0xbd0 kernel/workqueue.c:2301 worker_thread+0xaea/0x1510 kernel/workqueue.c:2447 kthread+0x34b/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd3/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 insert_work+0x56/0x310 kernel/workqueue.c:1352 __queue_work+0x970/0xd10 kernel/workqueue.c:1518 queue_work_on+0x105/0x160 kernel/workqueue.c:1545 usbnet_link_change+0xeb/0x100 usbnet_probe+0x1df7/0x2860 drivers/net/usb/usbnet.c:1806 usb_probe_interface+0x5b6/0xa90 drivers/usb/core/driver.c:397 really_probe+0x3eb/0xaf0 drivers/base/dd.c:562 driver_probe_device+0xfd/0x260 drivers/base/dd.c:752 __device_attach_driver+0x29b/0x410 drivers/base/dd.c:863 bus_for_each_drv+0x183/0x200 drivers/base/bus.c:431 __device_attach+0x30a/0x500 drivers/base/dd.c:932 device_initial_probe+0x1a/0x20 drivers/base/dd.c:981 bus_probe_device+0xbe/0x1e0 drivers/base/bus.c:491 device_add+0x889/0xbc0 drivers/base/core.c:3276 usb_set_configuration+0x19a5/0x1f30 drivers/usb/core/message.c:2160 usb_generic_driver_probe+0x8b/0x150 drivers/usb/core/generic.c:238 usb_probe_device+0x144/0x260 drivers/usb/core/driver.c:294 really_probe+0x3eb/0xaf0 drivers/base/dd.c:562 driver_probe_device+0xfd/0x260 drivers/base/dd.c:752 __device_attach_driver+0x29b/0x410 drivers/base/dd.c:863 bus_for_each_drv+0x183/0x200 drivers/base/bus.c:431 __device_attach+0x30a/0x500 drivers/base/dd.c:932 device_initial_probe+0x1a/0x20 drivers/base/dd.c:981 bus_probe_device+0xbe/0x1e0 drivers/base/bus.c:491 device_add+0x889/0xbc0 drivers/base/core.c:3276 usb_new_device+0xbbc/0x1760 drivers/usb/core/hub.c:2615 hub_port_connect drivers/usb/core/hub.c:5457 [inline] hub_port_connect_change drivers/usb/core/hub.c:5597 [inline] port_event drivers/usb/core/hub.c:5747 [inline] hub_event+0x2d3b/0x47c0 drivers/usb/core/hub.c:5829 process_one_work+0x6dc/0xbd0 kernel/workqueue.c:2301 worker_thread+0xaea/0x1510 kernel/workqueue.c:2447 kthread+0x34b/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 The buggy address belongs to the object at ffff888104dee000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 3176 bytes inside of 4096-byte region [ffff888104dee000, ffff888104def000) The buggy address belongs to the page: page:ffffea0004137a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888104dea000 pfn:0x104de8 head:ffffea0004137a00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 ffffea000442a408 ffffea00046bf608 ffff888100042c00 raw: ffff888104dea000 0000000000040003 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 0x1d2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 31534, ts 1667246158165, free_ts 1659147073867 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348 allocate_slab mm/slub.c:1808 [inline] new_slab+0x80/0x400 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x302/0x4b0 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] __kmalloc_track_caller+0x1f8/0x320 mm/slub.c:4536 __kmalloc_reserve net/core/skbuff.c:144 [inline] __alloc_skb+0xbc/0x510 net/core/skbuff.c:212 alloc_skb include/linux/skbuff.h:1126 [inline] nlmsg_new include/net/netlink.h:953 [inline] rtmsg_ifinfo_build_skb+0x7f/0x180 net/core/rtnetlink.c:3841 rtmsg_ifinfo_event net/core/rtnetlink.c:3877 [inline] rtmsg_ifinfo+0x78/0x120 net/core/rtnetlink.c:3886 __dev_notify_flags+0xdd/0x610 net/core/dev.c:8548 __rtnl_newlink net/core/rtnetlink.c:3487 [inline] rtnl_newlink+0x18fd/0x2000 net/core/rtnetlink.c:3527 rtnetlink_rcv_msg+0x955/0xc50 net/core/rtnetlink.c:5607 netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2499 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5625 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x8df/0xac0 net/netlink/af_netlink.c:1348 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] __free_pages_ok+0x82c/0x850 mm/page_alloc.c:1629 free_the_page+0x76/0x370 mm/page_alloc.c:5409 __free_pages+0x67/0xc0 mm/page_alloc.c:5418 __free_slab+0xcf/0x190 mm/slub.c:1894 free_slab mm/slub.c:1909 [inline] discard_slab mm/slub.c:1915 [inline] unfreeze_partials+0x15e/0x190 mm/slub.c:2410 put_cpu_partial+0xbf/0x180 mm/slub.c:2446 __slab_free+0x2c8/0x3a0 mm/slub.c:3095 do_slab_free mm/slub.c:3191 [inline] ___cache_free+0x111/0x130 mm/slub.c:3210 qlink_free+0x50/0x90 mm/kasan/quarantine.c:157 qlist_free_all+0x47/0xb0 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x15a/0x170 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:440 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x61/0x2f0 mm/slab.h:583 slab_alloc_node mm/slub.c:2947 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x168/0x2e0 mm/slub.c:2960 getname_flags+0xba/0x520 fs/namei.c:141 user_path_at_empty+0x2d/0x50 fs/namei.c:2740 Memory state around the buggy address: ffff888104deeb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888104deeb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888104deec00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888104deec80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888104deed00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================