usb 1-1: Direct firmware load for ueagle-atm/eagleI.fw failed with error -2 usb 1-1: Falling back to sysfs fallback for: ueagle-atm/eagleI.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+0x4b0/0x4e0 fs/kernfs/dir.c:775 Read of size 8 at addr ffff88807bde2b10 by task kworker/0:2/143 CPU: 0 PID: 143 Comm: kworker/0:2 Not tainted 6.1.0-rc2-syzkaller-00105-gb229b6ca5abb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 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 mm/kasan/report.c:284 [inline] print_report+0x15e/0x45d mm/kasan/report.c:395 kasan_report+0xbb/0x1f0 mm/kasan/report.c:495 kernfs_root fs/kernfs/kernfs-internal.h:66 [inline] kernfs_add_one+0x4b0/0x4e0 fs/kernfs/dir.c:775 kernfs_create_dir_ns+0x18b/0x220 fs/kernfs/dir.c:1021 internal_create_group+0x787/0xb10 fs/sysfs/group.c:136 dpm_sysfs_add+0x7e/0x290 drivers/base/power/sysfs.c:702 device_add+0xa82/0x1e90 drivers/base/core.c:3474 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+0x2d5/0xba0 drivers/base/firmware_loader/fallback.c:234 _request_firmware+0xbca/0x1190 drivers/base/firmware_loader/main.c:856 request_firmware_work_func+0xdd/0x230 drivers/base/firmware_loader/main.c:1105 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Allocated by task 143: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:45 kasan_set_track+0x21/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x7e/0x80 mm/kasan/common.c:325 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:737 [inline] slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x2ac/0x3c0 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:702 [inline] __kernfs_new_node+0xd4/0x8b0 fs/kernfs/dir.c:603 kernfs_new_node fs/kernfs/dir.c:665 [inline] kernfs_create_dir_ns+0x9c/0x220 fs/kernfs/dir.c:1011 internal_create_group+0x787/0xb10 fs/sysfs/group.c:136 dpm_sysfs_add+0x7e/0x290 drivers/base/power/sysfs.c:702 device_add+0xa82/0x1e90 drivers/base/core.c:3474 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+0x2d5/0xba0 drivers/base/firmware_loader/fallback.c:234 _request_firmware+0xbca/0x1190 drivers/base/firmware_loader/main.c:856 request_firmware_work_func+0xdd/0x230 drivers/base/firmware_loader/main.c:1105 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Freed by task 3692: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:45 kasan_set_track+0x21/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2a/0x40 mm/kasan/generic.c:511 ____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:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1750 slab_free mm/slub.c:3661 [inline] kmem_cache_free+0xea/0x5b0 mm/slub.c:3683 kernfs_put.part.0+0x2c4/0x540 fs/kernfs/dir.c:557 kernfs_put+0x42/0x50 fs/kernfs/dir.c:531 __kernfs_remove+0x463/0x600 fs/kernfs/dir.c:1443 kernfs_remove+0x77/0xa0 fs/kernfs/dir.c:1463 sysfs_remove_dir+0xc1/0x100 fs/sysfs/dir.c:101 __kobject_del+0xe2/0x1f0 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:3715 usb_disconnect.cold+0x49b/0x6ed drivers/usb/core/hub.c:2261 hub_port_connect drivers/usb/core/hub.c:5197 [inline] hub_port_connect_change drivers/usb/core/hub.c:5497 [inline] port_event drivers/usb/core/hub.c:5653 [inline] hub_event+0x1f86/0x45c0 drivers/usb/core/hub.c:5735 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 process_scheduled_works kernel/workqueue.c:2352 [inline] worker_thread+0x854/0x1080 kernel/workqueue.c:2438 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The buggy address belongs to the object at ffff88807bde2ae0 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 48 bytes inside of 168-byte region [ffff88807bde2ae0, ffff88807bde2b88) The buggy address belongs to the physical page: page:ffffea0001ef7880 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7bde2 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00008a0280 dead000000000004 ffff8880119d6c80 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 30555, tgid 30552 (syz-executor.5), ts 962382912398, free_ts 962360770188 prep_new_page mm/page_alloc.c:2538 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4287 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5554 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2285 alloc_slab_page mm/slub.c:1794 [inline] allocate_slab+0x213/0x300 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3180 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3279 slab_alloc_node mm/slub.c:3364 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x312/0x3c0 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:702 [inline] __kernfs_new_node+0xd4/0x8b0 fs/kernfs/dir.c:603 kernfs_new_node+0x93/0x120 fs/kernfs/dir.c:665 __kernfs_create_file+0x51/0x350 fs/kernfs/file.c:1043 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 netdev_queue_add_kobject net/core/net-sysfs.c:1672 [inline] netdev_queue_update_kobjects+0x3aa/0x4e0 net/core/net-sysfs.c:1718 register_queue_kobjects net/core/net-sysfs.c:1779 [inline] netdev_register_kobject+0x330/0x400 net/core/net-sysfs.c:2019 register_netdevice+0xd95/0x1670 net/core/dev.c:10057 ip_tunnel_newlink+0x3ba/0x990 net/ipv4/ip_tunnel.c:1154 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1458 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1508 free_unref_page_prepare mm/page_alloc.c:3386 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3482 __unfreeze_partials+0x17c/0x1a0 mm/slub.c:2586 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x62/0x80 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:737 [inline] slab_alloc_node mm/slub.c:3398 [inline] kmem_cache_alloc_node+0x2fc/0x400 mm/slub.c:3443 __alloc_skb+0x210/0x2f0 net/core/skbuff.c:497 alloc_skb include/linux/skbuff.h:1267 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1191 [inline] netlink_sendmsg+0x9a2/0xe10 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:734 ____sys_sendmsg+0x712/0x8c0 net/socket.c:2482 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2536 __sys_sendmsg+0xf3/0x1c0 net/socket.c:2565 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88807bde2a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807bde2a80: fb fb fb fb fc fc fc fc fc fc fc fc fa fb fb fb >ffff88807bde2b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807bde2b80: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb ffff88807bde2c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ==================================================================