usb 1-1: Direct firmware load for ueagle-atm/eagleII.fw failed with error -2 usb 1-1: Falling back to sysfs fallback for: ueagle-atm/eagleII.fw ================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read include/linux/instrumented.h:72 [inline] BUG: KASAN: slab-use-after-free in atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] BUG: KASAN: slab-use-after-free in kernfs_get.part.0+0x17/0x80 fs/kernfs/dir.c:522 Read of size 4 at addr ffff88807af0b910 by task kworker/0:2/898 CPU: 0 PID: 898 Comm: kworker/0:2 Not tainted 6.2.0-rc8-next-20230216-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/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 check_region_inline mm/kasan/generic.c:181 [inline] kasan_check_range+0x141/0x190 mm/kasan/generic.c:187 instrument_atomic_read include/linux/instrumented.h:72 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] kernfs_get.part.0+0x17/0x80 fs/kernfs/dir.c:522 kernfs_get+0x1f/0x30 fs/kernfs/dir.c:521 sysfs_get include/linux/sysfs.h:651 [inline] create_dir lib/kobject.c:79 [inline] kobject_add_internal+0x35a/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+0x9bf/0x1820 kernel/workqueue.c:2390 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 898: 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:769 [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+0x175/0x320 mm/slub.c:3476 kmem_cache_zalloc include/linux/slab.h:710 [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+0x9bf/0x1820 kernel/workqueue.c:2390 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Freed by task 5116: 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+0xec/0x4e0 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+0x9bf/0x1820 kernel/workqueue.c:2390 process_scheduled_works kernel/workqueue.c:2453 [inline] worker_thread+0x858/0x1090 kernel/workqueue.c:2539 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff88807af0b910 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 0 bytes inside of freed 168-byte region [ffff88807af0b910, ffff88807af0b9b8) The buggy address belongs to the physical page: page:ffffea0001ebc2c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7af0b anon flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffff888140008c80 0000000000000000 dead000000000001 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 13388, tgid 13385 (syz-executor.2), ts 1394534770422, free_ts 1383531081825 prep_new_page mm/page_alloc.c:2552 [inline] get_page_from_freelist+0x11bb/0x2d50 mm/page_alloc.c:4339 __alloc_pages+0x1cb/0x5c0 mm/page_alloc.c:5605 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2283 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x28e/0x380 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+0x30a/0x320 mm/slub.c:3476 kmem_cache_zalloc include/linux/slab.h:710 [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 netdev_queue_add_kobject net/core/net-sysfs.c:1691 [inline] netdev_queue_update_kobjects+0x3ae/0x4f0 net/core/net-sysfs.c:1737 register_queue_kobjects net/core/net-sysfs.c:1798 [inline] netdev_register_kobject+0x334/0x400 net/core/net-sysfs.c:2038 register_netdevice+0xd77/0x1640 net/core/dev.c:10051 register_netdev+0x31/0x50 net/core/dev.c:10179 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1453 [inline] free_pcp_prepare+0x4de/0x930 mm/page_alloc.c:1503 free_unref_page_prepare mm/page_alloc.c:3401 [inline] free_unref_page_list+0x176/0xcd0 mm/page_alloc.c:3542 release_pages+0xcd7/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+0x205/0x7d0 mm/mmap.c:3047 __mmput+0x128/0x4c0 kernel/fork.c:1209 mmput+0x60/0x70 kernel/fork.c:1231 exit_mm kernel/exit.c:563 [inline] do_exit+0x9d7/0x2b60 kernel/exit.c:856 do_group_exit+0xd4/0x2a0 kernel/exit.c:1019 __do_sys_exit_group kernel/exit.c:1030 [inline] __se_sys_exit_group kernel/exit.c:1028 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1028 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88807af0b800: fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb ffff88807af0b880: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc >ffff88807af0b900: fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807af0b980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fa ffff88807af0ba00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================