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:66 [inline] BUG: KASAN: slab-use-after-free in kernfs_next_descendant_post fs/kernfs/dir.c:1319 [inline] BUG: KASAN: slab-use-after-free in kernfs_activate fs/kernfs/dir.c:1374 [inline] BUG: KASAN: slab-use-after-free in kernfs_add_one+0x4b1/0x860 fs/kernfs/dir.c:789 Read of size 8 at addr ffff88802c26dbf8 by task kworker/0:0/7 CPU: 0 PID: 7 Comm: kworker/0:0 Not tainted 6.3.0-rc5-syzkaller-00137-gf2afccfefe7b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023 Workqueue: events request_firmware_work_func Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:319 [inline] print_report+0x163/0x540 mm/kasan/report.c:430 kasan_report+0x176/0x1b0 mm/kasan/report.c:536 kernfs_root fs/kernfs/kernfs-internal.h:66 [inline] kernfs_next_descendant_post fs/kernfs/dir.c:1319 [inline] kernfs_activate fs/kernfs/dir.c:1374 [inline] kernfs_add_one+0x4b1/0x860 fs/kernfs/dir.c:789 kernfs_create_dir_ns+0x1c4/0x230 fs/kernfs/dir.c:1039 sysfs_create_dir_ns+0x189/0x390 fs/sysfs/dir.c:59 create_dir lib/kobject.c:63 [inline] kobject_add_internal+0x6df/0xd20 lib/kobject.c:231 kobject_add_varg lib/kobject.c:366 [inline] kobject_add+0x152/0x210 lib/kobject.c:418 class_dir_create_and_add drivers/base/core.c:3121 [inline] get_device_parent+0x377/0x3e0 drivers/base/core.c:3177 device_add+0x33d/0x1060 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+0x301/0x950 drivers/base/firmware_loader/fallback.c:234 _request_firmware+0xc20/0x1210 drivers/base/firmware_loader/main.c:856 request_firmware_work_func+0x12a/0x270 drivers/base/firmware_loader/main.c:1105 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2390 worker_thread+0xa63/0x1210 kernel/workqueue.c:2537 kthread+0x270/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 7: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x66/0x70 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook+0x68/0x3a0 mm/slab.h:769 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+0x11f/0x2e0 mm/slub.c:3476 kmem_cache_zalloc include/linux/slab.h:710 [inline] __kernfs_new_node+0xdf/0x740 fs/kernfs/dir.c:611 kernfs_new_node fs/kernfs/dir.c:673 [inline] kernfs_create_dir_ns+0x94/0x230 fs/kernfs/dir.c:1029 sysfs_create_dir_ns+0x189/0x390 fs/sysfs/dir.c:59 create_dir lib/kobject.c:63 [inline] kobject_add_internal+0x6df/0xd20 lib/kobject.c:231 kobject_add_varg lib/kobject.c:366 [inline] kobject_add+0x152/0x210 lib/kobject.c:418 class_dir_create_and_add drivers/base/core.c:3121 [inline] get_device_parent+0x377/0x3e0 drivers/base/core.c:3177 device_add+0x33d/0x1060 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+0x301/0x950 drivers/base/firmware_loader/fallback.c:234 _request_firmware+0xc20/0x1210 drivers/base/firmware_loader/main.c:856 request_firmware_work_func+0x12a/0x270 drivers/base/firmware_loader/main.c:1105 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2390 worker_thread+0xa63/0x1210 kernel/workqueue.c:2537 kthread+0x270/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Freed by task 5159: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:521 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook mm/slub.c:1807 [inline] slab_free mm/slub.c:3787 [inline] kmem_cache_free+0x297/0x520 mm/slub.c:3809 kernfs_put+0x2a2/0x420 fs/kernfs/dir.c:565 __kernfs_remove+0x5fc/0x710 fs/kernfs/dir.c:1473 kernfs_remove+0x7a/0xa0 fs/kernfs/dir.c:1493 __kobject_del+0xe2/0x310 lib/kobject.c:596 kobject_del+0x45/0x60 lib/kobject.c:619 device_del+0x921/0xb10 drivers/base/core.c:3784 usb_disconnect+0x593/0x8d0 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+0x1f36/0x5460 drivers/usb/core/hub.c:5793 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2390 process_scheduled_works kernel/workqueue.c:2453 [inline] worker_thread+0xd20/0x1210 kernel/workqueue.c:2539 kthread+0x270/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff88802c26dbc8 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 48 bytes inside of freed 168-byte region [ffff88802c26dbc8, ffff88802c26dc70) The buggy address belongs to the physical page: page:ffffea0000b09b40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2c26d flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffff888140008dc0 ffffea0001d94fc0 dead000000000006 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 15901, tgid 15898 (syz-executor.1), ts 971010162390, free_ts 968363393685 prep_new_page mm/page_alloc.c:2553 [inline] get_page_from_freelist+0x3246/0x33c0 mm/page_alloc.c:4326 __alloc_pages+0x255/0x670 mm/page_alloc.c:5592 alloc_slab_page+0x6a/0x160 mm/slub.c:1851 allocate_slab mm/slub.c:1998 [inline] new_slab+0x84/0x2f0 mm/slub.c:2051 ___slab_alloc+0xa85/0x10a0 mm/slub.c:3193 __slab_alloc mm/slub.c:3292 [inline] __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+0x1b9/0x2e0 mm/slub.c:3476 kmem_cache_zalloc include/linux/slab.h:710 [inline] __kernfs_new_node+0xdf/0x740 fs/kernfs/dir.c:611 kernfs_new_node+0x99/0x170 fs/kernfs/dir.c:673 __kernfs_create_file+0x49/0x2e0 fs/kernfs/file.c:1047 sysfs_add_file_mode_ns+0x24a/0x300 fs/sysfs/file.c:294 sysfs_create_file_ns+0x197/0x2a0 fs/sysfs/file.c:355 add_bind_files drivers/base/bus.c:591 [inline] bus_add_driver+0x47b/0x620 drivers/base/bus.c:692 driver_register+0x23a/0x320 drivers/base/driver.c:246 usb_gadget_register_driver_owner+0xdd/0x230 drivers/usb/gadget/udc/core.c:1560 raw_ioctl_run drivers/usb/gadget/legacy/raw_gadget.c:546 [inline] raw_ioctl+0x13ae/0x3cd0 drivers/usb/gadget/legacy/raw_gadget.c:1253 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856 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 mm/page_alloc.c:1504 [inline] free_unref_page_prepare+0xe2f/0xe70 mm/page_alloc.c:3388 free_unref_page+0x37/0x3f0 mm/page_alloc.c:3483 vfree+0x186/0x2e0 mm/vmalloc.c:2742 delayed_vfree_work+0x56/0x80 mm/vmalloc.c:2663 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2390 worker_thread+0xa63/0x1210 kernel/workqueue.c:2537 kthread+0x270/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff88802c26da80: fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb fb ffff88802c26db00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88802c26db80: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb ^ ffff88802c26dc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff88802c26dc80: fc fc fc fc fc fc fb fb fb fb fb fb fb fb fb fb ==================================================================