usb 6-1: Direct firmware load for ueagle-atm/adi930.fw failed with error -2 usb 6-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_add_one+0x4da/0x530 fs/kernfs/dir.c:793 Read of size 8 at addr ffff8880a39ccbf8 by task kworker/1:3/9973 CPU: 1 PID: 9973 Comm: kworker/1:3 Not tainted 6.4.0-syzkaller-12155-ga452483508d7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/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:364 print_report mm/kasan/report.c:475 [inline] kasan_report+0x11d/0x130 mm/kasan/report.c:588 kernfs_root fs/kernfs/kernfs-internal.h:68 [inline] kernfs_add_one+0x4da/0x530 fs/kernfs/dir.c:793 kernfs_create_dir_ns+0x18f/0x230 fs/kernfs/dir.c:1046 sysfs_create_dir_ns+0x12b/0x290 fs/sysfs/dir.c:59 create_dir lib/kobject.c:65 [inline] kobject_add_internal+0x2c9/0x9c0 lib/kobject.c:233 kobject_add_varg lib/kobject.c:367 [inline] kobject_add+0x158/0x230 lib/kobject.c:419 class_dir_create_and_add drivers/base/core.c:3169 [inline] get_device_parent+0x33d/0x4e0 drivers/base/core.c:3220 device_add+0x2b4/0x1a40 drivers/base/core.c:3549 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+0xc67/0x1290 drivers/base/firmware_loader/main.c:909 request_firmware_work_func+0xe1/0x240 drivers/base/firmware_loader/main.c:1160 process_one_work+0xa34/0x16f0 kernel/workqueue.c:2597 worker_thread+0x67d/0x10c0 kernel/workqueue.c:2748 kthread+0x344/0x440 kernel/kthread.c:389 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 9973: 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:750 [inline] slab_alloc_node mm/slub.c:3470 [inline] slab_alloc mm/slub.c:3478 [inline] __kmem_cache_alloc_lru mm/slub.c:3485 [inline] kmem_cache_alloc+0x16c/0x380 mm/slub.c:3494 kmem_cache_zalloc include/linux/slab.h:693 [inline] __kernfs_new_node+0xd4/0x8c0 fs/kernfs/dir.c:611 kernfs_new_node fs/kernfs/dir.c:675 [inline] kernfs_create_dir_ns+0xa0/0x230 fs/kernfs/dir.c:1036 sysfs_create_dir_ns+0x12b/0x290 fs/sysfs/dir.c:59 create_dir lib/kobject.c:65 [inline] kobject_add_internal+0x2c9/0x9c0 lib/kobject.c:233 kobject_add_varg lib/kobject.c:367 [inline] kobject_add+0x158/0x230 lib/kobject.c:419 class_dir_create_and_add drivers/base/core.c:3169 [inline] get_device_parent+0x33d/0x4e0 drivers/base/core.c:3220 device_add+0x2b4/0x1a40 drivers/base/core.c:3549 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+0xc67/0x1290 drivers/base/firmware_loader/main.c:909 request_firmware_work_func+0xe1/0x240 drivers/base/firmware_loader/main.c:1160 process_one_work+0xa34/0x16f0 kernel/workqueue.c:2597 worker_thread+0x67d/0x10c0 kernel/workqueue.c:2748 kthread+0x344/0x440 kernel/kthread.c:389 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Freed by task 13963: kasan_save_stack+0x22/0x40 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: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:1792 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1818 slab_free mm/slub.c:3801 [inline] kmem_cache_free+0xf0/0x490 mm/slub.c:3823 kernfs_put.part.0+0x228/0x470 fs/kernfs/dir.c:565 kernfs_put+0x46/0x50 fs/kernfs/dir.c:539 __kernfs_remove+0x507/0x780 fs/kernfs/dir.c:1483 kernfs_remove+0x7b/0xa0 fs/kernfs/dir.c:1503 sysfs_remove_dir+0xc5/0x100 fs/sysfs/dir.c:101 __kobject_del+0xe2/0x1f0 lib/kobject.c:597 kobject_del lib/kobject.c:620 [inline] kobject_del+0x40/0x60 lib/kobject.c:612 device_del+0x664/0xa30 drivers/base/core.c:3823 usb_disconnect+0x51e/0x8a0 drivers/usb/core/hub.c:2279 hub_port_connect drivers/usb/core/hub.c:5261 [inline] hub_port_connect_change drivers/usb/core/hub.c:5566 [inline] port_event drivers/usb/core/hub.c:5726 [inline] hub_event+0x1fbf/0x4e40 drivers/usb/core/hub.c:5808 process_one_work+0xa34/0x16f0 kernel/workqueue.c:2597 process_scheduled_works kernel/workqueue.c:2664 [inline] worker_thread+0x881/0x10c0 kernel/workqueue.c:2750 kthread+0x344/0x440 kernel/kthread.c:389 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff8880a39ccbc8 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 48 bytes inside of freed 168-byte region [ffff8880a39ccbc8, ffff8880a39ccc70) The buggy address belongs to the physical page: page:ffffea00028e7300 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xa39cc flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff888014675dc0 ffffea0002556780 dead00000000000a 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 5425, tgid 5424 (syz-executor.5), ts 2390235165611, free_ts 2390191250169 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0xfed/0x2d30 mm/page_alloc.c:3221 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4477 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2279 alloc_slab_page mm/slub.c:1862 [inline] allocate_slab+0x25f/0x390 mm/slub.c:2009 new_slab mm/slub.c:2062 [inline] ___slab_alloc+0xbc3/0x15d0 mm/slub.c:3215 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3314 __slab_alloc_node mm/slub.c:3367 [inline] slab_alloc_node mm/slub.c:3460 [inline] slab_alloc mm/slub.c:3478 [inline] __kmem_cache_alloc_lru mm/slub.c:3485 [inline] kmem_cache_alloc+0x365/0x380 mm/slub.c:3494 kmem_cache_zalloc include/linux/slab.h:693 [inline] __kernfs_new_node+0xd4/0x8c0 fs/kernfs/dir.c:611 kernfs_new_node+0x97/0x120 fs/kernfs/dir.c:675 __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/0xba0 fs/sysfs/group.c:152 internal_create_groups.part.0+0x90/0x140 fs/sysfs/group.c:192 internal_create_groups fs/sysfs/group.c:188 [inline] sysfs_create_groups+0x29/0x50 fs/sysfs/group.c:218 device_add_groups drivers/base/core.c:2726 [inline] device_add_attrs drivers/base/core.c:2835 [inline] device_add+0x62c/0x1a40 drivers/base/core.c:3579 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1161 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2348 free_unref_page_list+0xe3/0xa70 mm/page_alloc.c:2489 release_pages+0xcd8/0x1380 mm/swap.c:1042 tlb_batch_pages_flush+0xa8/0x1a0 mm/mmu_gather.c:97 tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu mm/mmu_gather.c:299 [inline] tlb_finish_mmu+0x14b/0x7e0 mm/mmu_gather.c:391 exit_mmap+0x2cd/0x960 mm/mmap.c:3208 __mmput+0x128/0x4c0 kernel/fork.c:1347 mmput+0x60/0x70 kernel/fork.c:1369 exit_mm kernel/exit.c:567 [inline] do_exit+0x9a7/0x29a0 kernel/exit.c:861 do_group_exit+0xd4/0x2a0 kernel/exit.c:1024 get_signal+0x249b/0x25f0 kernel/signal.c:2877 arch_do_signal_or_restart+0x79/0x5c0 arch/x86/kernel/signal.c:308 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x11f/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:297 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff8880a39cca80: fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb fb ffff8880a39ccb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a39ccb80: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb ^ ffff8880a39ccc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff8880a39ccc80: fc fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb ==================================================================