usb 2-1: Direct firmware load for ueagle-atm/adi930.fw failed with error -2 usb 2-1: Falling back to sysfs fallback for: ueagle-atm/adi930.fw ================================================================== BUG: KASAN: use-after-free in kernfs_root fs/kernfs/kernfs-internal.h:66 [inline] BUG: KASAN: use-after-free in kernfs_add_one+0x4f9/0x550 fs/kernfs/dir.c:766 Read of size 8 at addr ffff88807ea26118 by task kworker/0:10/7313 CPU: 0 PID: 7313 Comm: kworker/0:10 Not tainted 5.18.0-rc6-syzkaller-00153-g2fe1020d73ca #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events request_firmware_work_func Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0xeb/0x495 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 kernfs_root fs/kernfs/kernfs-internal.h:66 [inline] kernfs_add_one+0x4f9/0x550 fs/kernfs/dir.c:766 kernfs_create_dir_ns+0x18b/0x220 fs/kernfs/dir.c:1013 sysfs_create_dir_ns+0x127/0x290 fs/sysfs/dir.c:59 create_dir lib/kobject.c:63 [inline] kobject_add_internal+0x2ce/0x900 lib/kobject.c:223 kobject_add_varg lib/kobject.c:358 [inline] kobject_add+0x150/0x1c0 lib/kobject.c:410 class_dir_create_and_add drivers/base/core.c:2942 [inline] get_device_parent+0x3d7/0x590 drivers/base/core.c:2997 device_add+0x2a8/0x1e20 drivers/base/core.c:3326 fw_load_sysfs_fallback drivers/base/firmware_loader/fallback.c:512 [inline] fw_load_from_user_helper drivers/base/firmware_loader/fallback.c:588 [inline] firmware_fallback_sysfs+0x402/0xe70 drivers/base/firmware_loader/fallback.c:664 _request_firmware+0xb97/0xfe0 drivers/base/firmware_loader/main.c:774 request_firmware_work_func+0xdd/0x230 drivers/base/firmware_loader/main.c:1020 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Allocated by task 7313: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] __kasan_slab_alloc+0x90/0xc0 mm/kasan/common.c:469 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:749 [inline] slab_alloc_node mm/slub.c:3217 [inline] slab_alloc mm/slub.c:3225 [inline] __kmem_cache_alloc_lru mm/slub.c:3232 [inline] kmem_cache_alloc+0x204/0x3b0 mm/slub.c:3242 kmem_cache_zalloc include/linux/slab.h:704 [inline] __kernfs_new_node+0xd4/0x8b0 fs/kernfs/dir.c:585 kernfs_new_node fs/kernfs/dir.c:647 [inline] kernfs_create_dir_ns+0x9c/0x220 fs/kernfs/dir.c:1003 sysfs_create_dir_ns+0x127/0x290 fs/sysfs/dir.c:59 create_dir lib/kobject.c:63 [inline] kobject_add_internal+0x2ce/0x900 lib/kobject.c:223 kobject_add_varg lib/kobject.c:358 [inline] kobject_add+0x150/0x1c0 lib/kobject.c:410 class_dir_create_and_add drivers/base/core.c:2942 [inline] get_device_parent+0x3d7/0x590 drivers/base/core.c:2997 device_add+0x2a8/0x1e20 drivers/base/core.c:3326 fw_load_sysfs_fallback drivers/base/firmware_loader/fallback.c:512 [inline] fw_load_from_user_helper drivers/base/firmware_loader/fallback.c:588 [inline] firmware_fallback_sysfs+0x402/0xe70 drivers/base/firmware_loader/fallback.c:664 _request_firmware+0xb97/0xfe0 drivers/base/firmware_loader/main.c:774 request_firmware_work_func+0xdd/0x230 drivers/base/firmware_loader/main.c:1020 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Freed by task 7314: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free+0x166/0x1a0 mm/kasan/common.c:328 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1754 slab_free mm/slub.c:3510 [inline] kmem_cache_free+0xdd/0x5a0 mm/slub.c:3527 kernfs_put.part.0+0x2c4/0x540 fs/kernfs/dir.c:539 kernfs_put+0x42/0x50 fs/kernfs/dir.c:513 __kernfs_remove+0x7a3/0xb20 fs/kernfs/dir.c:1397 kernfs_remove+0x77/0xa0 fs/kernfs/dir.c:1417 sysfs_remove_dir+0xc1/0x100 fs/sysfs/dir.c:101 __kobject_del+0xe2/0x200 lib/kobject.c:588 kobject_del lib/kobject.c:611 [inline] kobject_del+0x3c/0x60 lib/kobject.c:603 device_del+0x81c/0xc80 drivers/base/core.c:3603 usb_disconnect.cold+0x4ba/0x6ec drivers/usb/core/hub.c:2254 hub_port_connect drivers/usb/core/hub.c:5207 [inline] hub_port_connect_change drivers/usb/core/hub.c:5507 [inline] port_event drivers/usb/core/hub.c:5665 [inline] hub_event+0x1e74/0x4680 drivers/usb/core/hub.c:5747 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 process_scheduled_works kernel/workqueue.c:2352 [inline] worker_thread+0x854/0x1080 kernel/workqueue.c:2438 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 The buggy address belongs to the object at ffff88807ea260e8 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 48 bytes inside of 168-byte region [ffff88807ea260e8, ffff88807ea26190) The buggy address belongs to the physical page: page:ffffea0001fa8980 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ea26 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0001e0de80 dead000000000008 ffff888010dcdb40 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 6034, tgid 6033 (syz-executor.2), ts 1366533659829, free_ts 1366474580774 prep_new_page mm/page_alloc.c:2441 [inline] get_page_from_freelist+0xba2/0x3e00 mm/page_alloc.c:4182 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5408 alloc_pages+0x1aa/0x310 mm/mempolicy.c:2272 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab+0x26c/0x3c0 mm/slub.c:1944 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0x8df/0xf20 mm/slub.c:3005 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3092 slab_alloc_node mm/slub.c:3183 [inline] slab_alloc mm/slub.c:3225 [inline] __kmem_cache_alloc_lru mm/slub.c:3232 [inline] kmem_cache_alloc+0x360/0x3b0 mm/slub.c:3242 kmem_cache_zalloc include/linux/slab.h:704 [inline] __kernfs_new_node+0xd4/0x8b0 fs/kernfs/dir.c:585 kernfs_new_node+0x93/0x120 fs/kernfs/dir.c:647 __kernfs_create_file+0x51/0x350 fs/kernfs/file.c:982 sysfs_add_file_mode_ns+0x20f/0x3f0 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x322/0xb10 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+0x25/0x50 fs/sysfs/group.c:214 device_add_groups drivers/base/core.c:2471 [inline] device_add_attrs drivers/base/core.c:2630 [inline] device_add+0x1426/0x1e20 drivers/base/core.c:3356 netdev_register_kobject+0x181/0x430 net/core/net-sysfs.c:2008 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1356 [inline] free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1406 free_unref_page_prepare mm/page_alloc.c:3328 [inline] free_unref_page_list+0x16f/0xf80 mm/page_alloc.c:3460 release_pages+0xff1/0x2290 mm/swap.c:980 tlb_batch_pages_flush mm/mmu_gather.c:50 [inline] tlb_flush_mmu_free mm/mmu_gather.c:243 [inline] tlb_flush_mmu mm/mmu_gather.c:250 [inline] tlb_finish_mmu+0x165/0x8c0 mm/mmu_gather.c:341 exit_mmap+0x1de/0x4a0 mm/mmap.c:3142 __mmput+0x122/0x4b0 kernel/fork.c:1184 mmput+0x56/0x60 kernel/fork.c:1205 exit_mm kernel/exit.c:510 [inline] do_exit+0xa12/0x2a00 kernel/exit.c:782 do_group_exit+0xd2/0x2f0 kernel/exit.c:925 get_signal+0x22df/0x24c0 kernel/signal.c:2864 arch_do_signal_or_restart+0x82/0x20f0 arch/x86/kernel/signal.c:867 exit_to_user_mode_loop kernel/entry/common.c:166 [inline] exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:294 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff88807ea26000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807ea26080: fb fb fb fb fb fc fc fc fc fc fc fc fc fa fb fb >ffff88807ea26100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807ea26180: fb fb fc fc fc fc fc fc fc fc fb fb fb fb fb fb ffff88807ea26200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc ==================================================================