usb 7-1: Falling back to sysfs fallback for: ueagle-atm/adi930.fw ================================================================== BUG: KASAN: slab-use-after-free in kernfs_root fs/kernfs/kernfs-internal.h:68 [inline] BUG: KASAN: slab-use-after-free in kernfs_next_descendant_post+0x2d4/0x300 fs/kernfs/dir.c:1330 Read of size 8 at addr ffff8880220f9a28 by task kworker/1:3/5256 CPU: 1 PID: 5256 Comm: kworker/1:3 Not tainted 6.7.0-rc2-syzkaller-00265-gd2da77f431ac #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Workqueue: events request_firmware_work_func Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 kernfs_root fs/kernfs/kernfs-internal.h:68 [inline] kernfs_next_descendant_post+0x2d4/0x300 fs/kernfs/dir.c:1330 kernfs_activate fs/kernfs/dir.c:1385 [inline] kernfs_add_one+0x3b5/0x510 fs/kernfs/dir.c:798 kernfs_create_dir_ns+0x181/0x210 fs/kernfs/dir.c:1050 sysfs_create_dir_ns+0x13b/0x2b0 fs/sysfs/dir.c:59 create_dir lib/kobject.c:73 [inline] kobject_add_internal+0x2c8/0x970 lib/kobject.c:238 kobject_add_varg lib/kobject.c:372 [inline] kobject_add+0x16f/0x240 lib/kobject.c:424 class_dir_create_and_add drivers/base/core.c:3168 [inline] get_device_parent+0x393/0x4e0 drivers/base/core.c:3219 device_add+0x1ae/0x1aa0 drivers/base/core.c:3549 fw_load_sysfs_fallback drivers/base/firmware_loader/fallback.c:86 [inline] fw_load_from_user_helper drivers/base/firmware_loader/fallback.c:162 [inline] firmware_fallback_sysfs+0x2e8/0xbd0 drivers/base/firmware_loader/fallback.c:238 _request_firmware+0xe5b/0x12a0 drivers/base/firmware_loader/main.c:910 request_firmware_work_func+0xeb/0x240 drivers/base/firmware_loader/main.c:1161 process_one_work+0x886/0x15d0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Allocated by task 5256: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:763 [inline] slab_alloc_node mm/slub.c:3478 [inline] slab_alloc mm/slub.c:3486 [inline] __kmem_cache_alloc_lru mm/slub.c:3493 [inline] kmem_cache_alloc+0x15d/0x2f0 mm/slub.c:3502 kmem_cache_zalloc include/linux/slab.h:711 [inline] __kernfs_new_node+0xd3/0x890 fs/kernfs/dir.c:615 kernfs_new_node fs/kernfs/dir.c:679 [inline] kernfs_create_dir_ns+0x9a/0x210 fs/kernfs/dir.c:1040 sysfs_create_dir_ns+0x13b/0x2b0 fs/sysfs/dir.c:59 create_dir lib/kobject.c:73 [inline] kobject_add_internal+0x2c8/0x970 lib/kobject.c:238 kobject_add_varg lib/kobject.c:372 [inline] kobject_add+0x16f/0x240 lib/kobject.c:424 class_dir_create_and_add drivers/base/core.c:3168 [inline] get_device_parent+0x393/0x4e0 drivers/base/core.c:3219 device_add+0x1ae/0x1aa0 drivers/base/core.c:3549 fw_load_sysfs_fallback drivers/base/firmware_loader/fallback.c:86 [inline] fw_load_from_user_helper drivers/base/firmware_loader/fallback.c:162 [inline] firmware_fallback_sysfs+0x2e8/0xbd0 drivers/base/firmware_loader/fallback.c:238 _request_firmware+0xe5b/0x12a0 drivers/base/firmware_loader/main.c:910 request_firmware_work_func+0xeb/0x240 drivers/base/firmware_loader/main.c:1161 process_one_work+0x886/0x15d0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Freed by task 54: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] kmem_cache_free+0xf8/0x350 mm/slub.c:3831 kernfs_put.part.0+0x22a/0x490 fs/kernfs/dir.c:569 kernfs_put+0x47/0x50 fs/kernfs/dir.c:543 __kernfs_remove+0x3ff/0x650 fs/kernfs/dir.c:1487 kernfs_remove+0x79/0xa0 fs/kernfs/dir.c:1507 sysfs_remove_dir+0xc5/0x100 fs/sysfs/dir.c:101 __kobject_del+0xd3/0x1e0 lib/kobject.c:601 kobject_del lib/kobject.c:624 [inline] kobject_del+0x3f/0x60 lib/kobject.c:616 device_del+0x66d/0xa50 drivers/base/core.c:3834 usb_disconnect+0x588/0x910 drivers/usb/core/hub.c:2265 hub_port_connect drivers/usb/core/hub.c:5280 [inline] hub_port_connect_change drivers/usb/core/hub.c:5580 [inline] port_event drivers/usb/core/hub.c:5740 [inline] hub_event+0x1db7/0x4e10 drivers/usb/core/hub.c:5822 process_one_work+0x886/0x15d0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 The buggy address belongs to the object at ffff8880220f99f8 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 48 bytes inside of freed 168-byte region [ffff8880220f99f8, ffff8880220f9aa0) The buggy address belongs to the physical page: page:ffffea0000883e40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x220f9 ksm flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888040649900 ffffea000061bb00 dead000000000003 raw: 0000000000000000 0000000080110011 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 5214, tgid 5214 (syz-executor.1), ts 160638801168, free_ts 159925481595 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0xa25/0x36d0 mm/page_alloc.c:3312 __alloc_pages+0x22e/0x2420 mm/page_alloc.c:4568 alloc_pages_mpol+0x258/0x5f0 mm/mempolicy.c:2133 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab mm/slub.c:2017 [inline] new_slab+0x283/0x3c0 mm/slub.c:2070 ___slab_alloc+0x979/0x1500 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] slab_alloc mm/slub.c:3486 [inline] __kmem_cache_alloc_lru mm/slub.c:3493 [inline] kmem_cache_alloc+0x2dc/0x2f0 mm/slub.c:3502 kmem_cache_zalloc include/linux/slab.h:711 [inline] __kernfs_new_node+0xd3/0x890 fs/kernfs/dir.c:615 kernfs_new_node+0x94/0x110 fs/kernfs/dir.c:679 __kernfs_create_file+0x53/0x340 fs/kernfs/file.c:1025 sysfs_add_file_mode_ns+0x1ff/0x3b0 fs/sysfs/file.c:307 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x31c/0xb50 fs/sysfs/group.c:152 netdev_queue_add_kobject net/core/net-sysfs.c:1701 [inline] netdev_queue_update_kobjects+0x236/0x520 net/core/net-sysfs.c:1747 register_queue_kobjects net/core/net-sysfs.c:1808 [inline] netdev_register_kobject+0x297/0x3f0 net/core/net-sysfs.c:2048 register_netdevice+0x1382/0x1da0 net/core/dev.c:10218 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x4fa/0xaa0 mm/page_alloc.c:2347 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2487 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:763 [inline] slab_alloc_node mm/slub.c:3478 [inline] __kmem_cache_alloc_node+0x195/0x310 mm/slub.c:3517 kmalloc_trace+0x25/0x60 mm/slab_common.c:1098 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] ref_tracker_alloc+0x17c/0x5a0 lib/ref_tracker.c:203 __netdev_tracker_alloc include/linux/netdevice.h:4107 [inline] netdev_hold include/linux/netdevice.h:4136 [inline] netdev_hold include/linux/netdevice.h:4131 [inline] rx_queue_add_kobject net/core/net-sysfs.c:1085 [inline] net_rx_queue_update_kobjects+0x284/0x5e0 net/core/net-sysfs.c:1143 register_queue_kobjects net/core/net-sysfs.c:1803 [inline] netdev_register_kobject+0x274/0x3f0 net/core/net-sysfs.c:2048 register_netdevice+0x1382/0x1da0 net/core/dev.c:10218 veth_newlink+0x363/0xa00 drivers/net/veth.c:1895 rtnl_newlink_create net/core/rtnetlink.c:3521 [inline] __rtnl_newlink+0x1173/0x1930 net/core/rtnetlink.c:3741 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3754 rtnetlink_rcv_msg+0x3c7/0xe00 net/core/rtnetlink.c:6558 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2545 Memory state around the buggy address: ffff8880220f9900: fc fc fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880220f9980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fa >ffff8880220f9a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880220f9a80: fb fb fb fb fc fc fc fc fc fc fc fc fa fb fb fb ffff8880220f9b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================