Hello,
syzbot found the following issue on:
HEAD commit: 3594f306da12 Linux 6.1.147
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=124bd0a2580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=30b8ca4950f83e04
dashboard link:
https://syzkaller.appspot.com/bug?extid=7ff08c267e7150c929f5
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/5b0395e2ec6c/disk-3594f306.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/c3ec331b7d5b/vmlinux-3594f306.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/bff42068e062/bzImage-3594f306.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+7ff08c...@syzkaller.appspotmail.com
usb 5-1: Direct firmware load for ueagle-atm/eagleI.fw failed with error -2
usb 5-1: Falling back to sysfs fallback for: ueagle-atm/eagleI.fw
==================================================================
BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:72 [inline]
BUG: KASAN: use-after-free in atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline]
BUG: KASAN: use-after-free in kernfs_get fs/kernfs/dir.c:525 [inline]
BUG: KASAN: use-after-free in kernfs_new_node+0x166/0x250 fs/kernfs/dir.c:693
Read of size 4 at addr ffff8880592359f8 by task kworker/0:0/7
CPU: 0 PID: 7 Comm: kworker/0:0 Not tainted 6.1.147-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/0x22e lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0xa8/0x200 mm/kasan/report.c:418
kasan_report+0x10b/0x140 mm/kasan/report.c:522
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x27b/0x290 mm/kasan/generic.c:189
instrument_atomic_read include/linux/instrumented.h:72 [inline]
atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline]
kernfs_get fs/kernfs/dir.c:525 [inline]
kernfs_new_node+0x166/0x250 fs/kernfs/dir.c:693
kernfs_create_dir_ns+0x40/0x120 fs/kernfs/dir.c:1046
sysfs_create_dir_ns+0x120/0x280 fs/sysfs/dir.c:59
create_dir lib/kobject.c:63 [inline]
kobject_add_internal+0x6b8/0xc80 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:3234 [inline]
get_device_parent+0x380/0x3f0 drivers/base/core.c:3289
device_add+0x335/0xfb0 drivers/base/core.c:3618
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+0x2e5/0x930 drivers/base/firmware_loader/fallback.c:234
_request_firmware+0xcad/0x1290 drivers/base/firmware_loader/main.c:884
request_firmware_work_func+0xac/0x1b0 drivers/base/firmware_loader/main.c:1135
process_one_work+0x898/0x1160 kernel/workqueue.c:2292
worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
</TASK>
Allocated by task 5520:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
__kasan_slab_alloc+0x6b/0x80 mm/kasan/common.c:328
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737
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+0x123/0x2f0 mm/slub.c:3422
kmem_cache_zalloc include/linux/slab.h:689 [inline]
__kernfs_new_node+0xd4/0x7d0 fs/kernfs/dir.c:614
kernfs_new_node+0x148/0x250 fs/kernfs/dir.c:690
kernfs_create_dir_ns+0x40/0x120 fs/kernfs/dir.c:1046
sysfs_create_dir_ns+0x120/0x280 fs/sysfs/dir.c:59
create_dir lib/kobject.c:63 [inline]
kobject_add_internal+0x6b8/0xc80 lib/kobject.c:231
kobject_add_varg lib/kobject.c:366 [inline]
kobject_add+0x152/0x210 lib/kobject.c:418
device_add+0x483/0xfb0 drivers/base/core.c:3632
usb_new_device+0xd4d/0x1620 drivers/usb/core/hub.c:2659
hub_port_connect drivers/usb/core/hub.c:5517 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5657 [inline]
port_event drivers/usb/core/hub.c:5817 [inline]
hub_event+0x2d5e/0x54e0 drivers/usb/core/hub.c:5899
process_one_work+0x898/0x1160 kernel/workqueue.c:2292
worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Freed by task 4772:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x2d/0x50 mm/kasan/generic.c:516
____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1724 [inline]
slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1750
slab_free mm/slub.c:3661 [inline]
kmem_cache_free+0xf7/0x290 mm/slub.c:3683
kernfs_put+0x319/0x490 fs/kernfs/dir.c:568
evict+0x485/0x870 fs/inode.c:705
__dentry_kill+0x431/0x650 fs/dcache.c:611
dentry_kill+0xb8/0x290 fs/dcache.c:-1
dput+0xfa/0x1d0 fs/dcache.c:918
lookup_fast+0x318/0x4d0 fs/namei.c:1656
walk_component fs/namei.c:1994 [inline]
link_path_walk+0x5f2/0xe50 fs/namei.c:2325
path_openat+0x276/0x2e70 fs/namei.c:3779
do_filp_open+0x1c1/0x3c0 fs/namei.c:3810
do_sys_openat2+0x142/0x490 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__x64_sys_openat+0x135/0x160 fs/open.c:1345
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
The buggy address belongs to the object at ffff8880592359f8
which belongs to the cache kernfs_node_cache of size 168
The buggy address is located 0 bytes inside of
168-byte region [ffff8880592359f8, ffff888059235aa0)
The buggy address belongs to the physical page:
page:ffffea0001648d40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x59235
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea0001655380 dead000000000006 ffff888140009c80
raw: 0000000000000000 0000000000110011 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 4268, tgid 4268 (syz-executor), ts 75912031801, free_ts 23214293270
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532
prep_new_page mm/page_alloc.c:2539 [inline]
get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328
__alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614
alloc_slab_page+0x5d/0x160 mm/slub.c:1794
allocate_slab mm/slub.c:1939 [inline]
new_slab+0x87/0x2c0 mm/slub.c:1992
___slab_alloc+0xbc6/0x1220 mm/slub.c:3180
__slab_alloc mm/slub.c:3279 [inline]
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+0x1b7/0x2f0 mm/slub.c:3422
kmem_cache_zalloc include/linux/slab.h:689 [inline]
__kernfs_new_node+0xd4/0x7d0 fs/kernfs/dir.c:614
kernfs_new_node+0x148/0x250 fs/kernfs/dir.c:690
kernfs_create_link+0xa3/0x200 fs/kernfs/symlink.c:39
sysfs_do_create_link_sd+0x83/0x110 fs/sysfs/symlink.c:44
br_sysfs_addif+0x75/0x220 net/bridge/br_sysfs_if.c:376
br_add_if+0x3a6/0xec0 net/bridge/br_if.c:618
do_set_master net/core/rtnetlink.c:2630 [inline]
do_setlink+0xdc0/0x3c40 net/core/rtnetlink.c:2840
__rtnl_newlink net/core/rtnetlink.c:3608 [inline]
rtnl_newlink+0x17d6/0x1ff0 net/core/rtnetlink.c:3655
rtnetlink_rcv_msg+0x79b/0xed0 net/core/rtnetlink.c:6153
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1459 [inline]
free_pcp_prepare mm/page_alloc.c:1509 [inline]
free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384
free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479
free_contig_range+0x9d/0x150 mm/page_alloc.c:9574
destroy_args+0xef/0x8bf mm/debug_vm_pgtable.c:1031
debug_vm_pgtable+0x32a/0x37e mm/debug_vm_pgtable.c:1354
do_one_initcall+0x214/0x7a0 init/main.c:1298
do_initcall_level+0x137/0x1e4 init/main.c:1371
do_initcalls+0x4b/0x8a init/main.c:1387
kernel_init_freeable+0x3fa/0x5ac init/main.c:1626
kernel_init+0x19/0x1b0 init/main.c:1514
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Memory state around the buggy address:
ffff888059235880: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc
ffff888059235900: fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888059235980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fa
^
ffff888059235a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888059235a80: fb fb fb fb fc fc fc fc fc fc fc fc fa 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