usb 5-1: Direct firmware load for ueagle-atm/eagleI.fw failed with error -2 usb 5-1: Falling back to sysfs fallback for: ueagle-atm/eagleI.fw ================================================================== BUG: KASAN: slab-use-after-free in kernfs_root fs/kernfs/kernfs-internal.h:66 [inline] BUG: KASAN: slab-use-after-free in kernfs_add_one+0x4b4/0x4f0 fs/kernfs/dir.c:788 Read of size 8 at addr ffff888022e41858 by task kworker/0:4/11340 CPU: 0 PID: 11340 Comm: kworker/0:4 Not tainted 6.3.0-syzkaller-04626-g0cfd8703e7da #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Workqueue: events request_firmware_work_func Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:319 print_report mm/kasan/report.c:430 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:536 kernfs_root fs/kernfs/kernfs-internal.h:66 [inline] kernfs_add_one+0x4b4/0x4f0 fs/kernfs/dir.c:788 kernfs_create_dir_ns+0x18f/0x230 fs/kernfs/dir.c:1039 sysfs_create_dir_ns+0x12b/0x290 fs/sysfs/dir.c:59 create_dir lib/kobject.c:63 [inline] kobject_add_internal+0x2c9/0x9c0 lib/kobject.c:231 kobject_add_varg lib/kobject.c:366 [inline] kobject_add+0x154/0x230 lib/kobject.c:418 class_dir_create_and_add drivers/base/core.c:3121 [inline] get_device_parent+0x3d7/0x590 drivers/base/core.c:3177 device_add+0x2b4/0x1c50 drivers/base/core.c:3513 fw_load_sysfs_fallback drivers/base/firmware_loader/fallback.c:82 [inline] fw_load_from_user_helper drivers/base/firmware_loader/fallback.c:158 [inline] firmware_fallback_sysfs+0x2d9/0xc10 drivers/base/firmware_loader/fallback.c:234 _request_firmware+0xbe4/0x11f0 drivers/base/firmware_loader/main.c:856 request_firmware_work_func+0xe1/0x240 drivers/base/firmware_loader/main.c:1105 process_one_work+0x991/0x15c0 kernel/workqueue.c:2390 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 kthread+0x33e/0x440 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 11340: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x7f/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:710 [inline] slab_alloc_node mm/slub.c:3452 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc+0x17c/0x3b0 mm/slub.c:3476 kmem_cache_zalloc include/linux/slab.h:671 [inline] __kernfs_new_node+0xd4/0x8b0 fs/kernfs/dir.c:611 kernfs_new_node fs/kernfs/dir.c:673 [inline] kernfs_create_dir_ns+0xa0/0x230 fs/kernfs/dir.c:1029 sysfs_create_dir_ns+0x12b/0x290 fs/sysfs/dir.c:59 create_dir lib/kobject.c:63 [inline] kobject_add_internal+0x2c9/0x9c0 lib/kobject.c:231 kobject_add_varg lib/kobject.c:366 [inline] kobject_add+0x154/0x230 lib/kobject.c:418 class_dir_create_and_add drivers/base/core.c:3121 [inline] get_device_parent+0x3d7/0x590 drivers/base/core.c:3177 device_add+0x2b4/0x1c50 drivers/base/core.c:3513 fw_load_sysfs_fallback drivers/base/firmware_loader/fallback.c:82 [inline] fw_load_from_user_helper drivers/base/firmware_loader/fallback.c:158 [inline] firmware_fallback_sysfs+0x2d9/0xc10 drivers/base/firmware_loader/fallback.c:234 _request_firmware+0xbe4/0x11f0 drivers/base/firmware_loader/main.c:856 request_firmware_work_func+0xe1/0x240 drivers/base/firmware_loader/main.c:1105 process_one_work+0x991/0x15c0 kernel/workqueue.c:2390 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 kthread+0x33e/0x440 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Freed by task 21526: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2e/0x40 mm/kasan/generic.c:521 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] kmem_cache_free+0xe9/0x480 mm/slub.c:3809 kernfs_put.part.0+0x228/0x470 fs/kernfs/dir.c:565 kernfs_put+0x46/0x50 fs/kernfs/dir.c:539 __kernfs_remove+0x463/0x600 fs/kernfs/dir.c:1473 kernfs_remove+0x7b/0xa0 fs/kernfs/dir.c:1493 sysfs_remove_dir+0xc5/0x100 fs/sysfs/dir.c:101 __kobject_del+0xe2/0x1f0 lib/kobject.c:596 kobject_del lib/kobject.c:619 [inline] kobject_del+0x40/0x60 lib/kobject.c:611 device_del+0x753/0xb80 drivers/base/core.c:3784 usb_disconnect+0x51e/0x8a0 drivers/usb/core/hub.c:2264 hub_port_connect drivers/usb/core/hub.c:5246 [inline] hub_port_connect_change drivers/usb/core/hub.c:5551 [inline] port_event drivers/usb/core/hub.c:5711 [inline] hub_event+0x1fbf/0x4e40 drivers/usb/core/hub.c:5793 process_one_work+0x991/0x15c0 kernel/workqueue.c:2390 process_scheduled_works kernel/workqueue.c:2453 [inline] worker_thread+0x858/0x1090 kernel/workqueue.c:2539 kthread+0x33e/0x440 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff888022e41828 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 48 bytes inside of freed 168-byte region [ffff888022e41828, ffff888022e418d0) The buggy address belongs to the physical page: page:ffffea00008b9040 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x22e41 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffff888140008c80 ffffea00007fcec0 0000000000000002 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 29520, tgid 29508 (syz-executor.1), ts 2193330426623, free_ts 2182536365703 prep_new_page mm/page_alloc.c:2553 [inline] get_page_from_freelist+0x1190/0x2e20 mm/page_alloc.c:4326 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:5592 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2277 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x390 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc+0x38e/0x3b0 mm/slub.c:3476 kmem_cache_zalloc include/linux/slab.h:671 [inline] __kernfs_new_node+0xd4/0x8b0 fs/kernfs/dir.c:611 kernfs_new_node+0x97/0x120 fs/kernfs/dir.c:673 __kernfs_create_file+0x55/0x350 fs/kernfs/file.c:1047 sysfs_add_file_mode_ns+0x213/0x3f0 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x322/0xb80 fs/sysfs/group.c:148 internal_create_groups.part.0+0x90/0x140 fs/sysfs/group.c:188 internal_create_groups fs/sysfs/group.c:184 [inline] sysfs_create_groups+0x29/0x50 fs/sysfs/group.c:214 device_add_groups drivers/base/core.c:2678 [inline] device_add_attrs drivers/base/core.c:2787 [inline] device_add+0x67f/0x1c50 drivers/base/core.c:3543 netdev_register_kobject+0x185/0x400 net/core/net-sysfs.c:2043 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1454 [inline] free_pcp_prepare+0x5d5/0xa50 mm/page_alloc.c:1504 free_unref_page_prepare mm/page_alloc.c:3388 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3483 kasan_depopulate_vmalloc_pte+0x60/0x80 mm/kasan/shadow.c:427 apply_to_pte_range mm/memory.c:2578 [inline] apply_to_pmd_range mm/memory.c:2622 [inline] apply_to_pud_range mm/memory.c:2658 [inline] apply_to_p4d_range mm/memory.c:2694 [inline] __apply_to_page_range+0x68c/0x1030 mm/memory.c:2728 kasan_release_vmalloc+0xab/0xc0 mm/kasan/shadow.c:544 __purge_vmap_area_lazy+0x886/0x1e60 mm/vmalloc.c:1771 drain_vmap_area_work+0x54/0xd0 mm/vmalloc.c:1804 process_one_work+0x991/0x15c0 kernel/workqueue.c:2390 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 kthread+0x33e/0x440 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff888022e41700: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff888022e41780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc >ffff888022e41800: fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb ^ ffff888022e41880: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc ffff888022e41900: fc fc fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================