Hello,
syzbot found the following issue on:
HEAD commit: 1c700860e8bc Linux 5.15.185
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=128703d4580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=db74c56dea20051
dashboard link:
https://syzkaller.appspot.com/bug?extid=50be1c823c917382ca04
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/98c9bcd8fb21/disk-1c700860.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/75eaa3b1c3f3/vmlinux-1c700860.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/ed251e9d15fe/bzImage-1c700860.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+50be1c...@syzkaller.appspotmail.com
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: use-after-free in kernfs_root fs/kernfs/kernfs-internal.h:48 [inline]
BUG: KASAN: use-after-free in kernfs_add_one+0x4e6/0x6c0 fs/kernfs/dir.c:787
Read of size 8 at addr ffff8880618cf2e8 by task kworker/0:1/13
CPU: 0 PID: 13 Comm: kworker/0:1 Not tainted 5.15.185-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: events request_firmware_work_func
Call Trace:
<TASK>
dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
print_address_description+0x60/0x2d0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0xdf/0x130 mm/kasan/report.c:451
kernfs_root fs/kernfs/kernfs-internal.h:48 [inline]
kernfs_add_one+0x4e6/0x6c0 fs/kernfs/dir.c:787
kernfs_create_dir_ns+0xda/0x120 fs/kernfs/dir.c:1015
sysfs_create_dir_ns+0x120/0x280 fs/sysfs/dir.c:59
create_dir lib/kobject.c:89 [inline]
kobject_add_internal+0x662/0xd00 lib/kobject.c:263
kobject_add_varg lib/kobject.c:398 [inline]
kobject_add+0x152/0x210 lib/kobject.c:450
class_dir_create_and_add drivers/base/core.c:2966 [inline]
get_device_parent+0x380/0x3f0 drivers/base/core.c:3021
device_add+0x335/0xfb0 drivers/base/core.c:3333
fw_load_sysfs_fallback drivers/base/firmware_loader/fallback.c:507 [inline]
fw_load_from_user_helper drivers/base/firmware_loader/fallback.c:583 [inline]
firmware_fallback_sysfs+0x3e9/0xbc0 drivers/base/firmware_loader/fallback.c:659
_request_firmware+0xc86/0x12b0 drivers/base/firmware_loader/main.c:876
request_firmware_work_func+0xac/0x1b0 drivers/base/firmware_loader/main.c:1127
process_one_work+0x863/0x1000 kernel/workqueue.c:2310
worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
kthread+0x436/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
</TASK>
Allocated by task 13:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
__kasan_slab_alloc+0x9c/0xd0 mm/kasan/common.c:467
kasan_slab_alloc include/linux/kasan.h:254 [inline]
slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
slab_alloc_node mm/slub.c:3220 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc+0x100/0x290 mm/slub.c:3233
kmem_cache_zalloc include/linux/slab.h:725 [inline]
__kernfs_new_node+0xd6/0x680 fs/kernfs/dir.c:593
kernfs_new_node+0x148/0x250 fs/kernfs/dir.c:669
kernfs_create_dir_ns+0x40/0x120 fs/kernfs/dir.c:1005
sysfs_create_dir_ns+0x120/0x280 fs/sysfs/dir.c:59
create_dir lib/kobject.c:89 [inline]
kobject_add_internal+0x662/0xd00 lib/kobject.c:263
kobject_add_varg lib/kobject.c:398 [inline]
kobject_add+0x152/0x210 lib/kobject.c:450
class_dir_create_and_add drivers/base/core.c:2966 [inline]
get_device_parent+0x380/0x3f0 drivers/base/core.c:3021
device_add+0x335/0xfb0 drivers/base/core.c:3333
fw_load_sysfs_fallback drivers/base/firmware_loader/fallback.c:507 [inline]
fw_load_from_user_helper drivers/base/firmware_loader/fallback.c:583 [inline]
firmware_fallback_sysfs+0x3e9/0xbc0 drivers/base/firmware_loader/fallback.c:659
_request_firmware+0xc86/0x12b0 drivers/base/firmware_loader/main.c:876
request_firmware_work_func+0xac/0x1b0 drivers/base/firmware_loader/main.c:1127
process_one_work+0x863/0x1000 kernel/workqueue.c:2310
worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
kthread+0x436/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
Freed by task 4366:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:46
kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:1705 [inline]
slab_free_freelist_hook+0xea/0x170 mm/slub.c:1731
slab_free mm/slub.c:3499 [inline]
kmem_cache_free+0x8f/0x210 mm/slub.c:3515
kernfs_put+0x319/0x490 fs/kernfs/dir.c:547
__kernfs_remove+0x9aa/0xc50 fs/kernfs/dir.c:1393
kernfs_remove+0x1d/0x30 fs/kernfs/dir.c:1406
__kobject_del+0xe1/0x2f0 lib/kobject.c:628
kobject_del+0x41/0x60 lib/kobject.c:651
device_del+0x8f8/0xa70 drivers/base/core.c:3612
usb_disconnect+0x573/0x8a0 drivers/usb/core/hub.c:2285
hub_port_connect drivers/usb/core/hub.c:5311 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5607 [inline]
port_event drivers/usb/core/hub.c:5753 [inline]
hub_event+0x1af8/0x4fa0 drivers/usb/core/hub.c:5835
process_one_work+0x863/0x1000 kernel/workqueue.c:2310
process_scheduled_works kernel/workqueue.c:2373 [inline]
worker_thread+0xdca/0x12a0 kernel/workqueue.c:2459
kthread+0x436/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
The buggy address belongs to the object at ffff8880618cf2b8
which belongs to the cache kernfs_node_cache of size 168
The buggy address is located 48 bytes inside of
168-byte region [ffff8880618cf2b8, ffff8880618cf360)
The buggy address belongs to the page:
page:ffffea00018633c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x618cf
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 dead000000000100 dead000000000122 ffff8880169e9b40
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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 4175, ts 65976982478, free_ts 20652435495
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192
__alloc_pages+0x1e1/0x470 mm/page_alloc.c:5474
alloc_slab_page mm/slub.c:1775 [inline]
allocate_slab mm/slub.c:1912 [inline]
new_slab+0xc0/0x4b0 mm/slub.c:1975
___slab_alloc+0x81e/0xdf0 mm/slub.c:3008
__slab_alloc mm/slub.c:3095 [inline]
slab_alloc_node mm/slub.c:3186 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc+0x195/0x290 mm/slub.c:3233
kmem_cache_zalloc include/linux/slab.h:725 [inline]
__kernfs_new_node+0xd6/0x680 fs/kernfs/dir.c:593
kernfs_new_node+0x148/0x250 fs/kernfs/dir.c:669
__kernfs_create_file+0x47/0x2e0 fs/kernfs/file.c:985
sysfs_add_file_mode_ns+0x2d4/0x3a0 fs/sysfs/file.c:317
create_files fs/sysfs/group.c:64 [inline]
internal_create_group+0x489/0xcf0 fs/sysfs/group.c:149
internal_create_groups fs/sysfs/group.c:189 [inline]
sysfs_create_groups+0x55/0x120 fs/sysfs/group.c:215
create_dir lib/kobject.c:100 [inline]
kobject_add_internal+0x7a5/0xd00 lib/kobject.c:263
kobject_add_varg lib/kobject.c:398 [inline]
kobject_init_and_add+0x122/0x190 lib/kobject.c:481
netdev_queue_add_kobject net/core/net-sysfs.c:1666 [inline]
netdev_queue_update_kobjects+0x19c/0x3e0 net/core/net-sysfs.c:1711
register_queue_kobjects net/core/net-sysfs.c:1772 [inline]
netdev_register_kobject+0x265/0x310 net/core/net-sysfs.c:2018
register_netdevice+0x1019/0x16b0 net/core/dev.c:10397
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1340 [inline]
free_pcp_prepare mm/page_alloc.c:1391 [inline]
free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317
free_unref_page+0x94/0x280 mm/page_alloc.c:3396
free_contig_range+0x96/0xf0 mm/page_alloc.c:9393
destroy_args+0xef/0x8b0 mm/debug_vm_pgtable.c:1018
debug_vm_pgtable+0x318/0x370 mm/debug_vm_pgtable.c:1331
do_one_initcall+0x1ee/0x680 init/main.c:1302
do_initcall_level+0x137/0x1f0 init/main.c:1375
do_initcalls+0x4b/0x90 init/main.c:1391
kernel_init_freeable+0x3ce/0x560 init/main.c:1615
kernel_init+0x19/0x1b0 init/main.c:1506
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
Memory state around the buggy address:
ffff8880618cf180: fb fb fc fc fc fc fc fc fc fc fb fb fb fb fb fb
ffff8880618cf200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc
>ffff8880618cf280: fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb fb
^
ffff8880618cf300: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
ffff8880618cf380: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup