REISERFS (device loop7): journal params: device loop7, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30
REISERFS (device loop7): checking transaction log (loop7)
REISERFS (device loop7): Using r5 hash to sort names
==================================================================
BUG: KASAN: use-after-free in reiserfs_find_actor+0xe6/0x100 fs/reiserfs/inode.c:1625
Read of size 4 at addr ffff88805c69a1f0 by task syz.7.3127/19310
CPU: 1 PID: 19310 Comm: syz.7.3127 Not tainted 6.1.147-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
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
reiserfs_find_actor+0xe6/0x100 fs/reiserfs/inode.c:1625
find_inode+0x180/0x3c0 fs/inode.c:960
inode_insert5+0xf4/0x500 fs/inode.c:1257
insert_inode_locked4+0x5a/0x90 fs/inode.c:1767
reiserfs_new_inode+0x3e8/0x1860 fs/reiserfs/inode.c:1960
reiserfs_mkdir+0x557/0x970 fs/reiserfs/namei.c:845
xattr_mkdir fs/reiserfs/xattr.c:76 [inline]
create_privroot fs/reiserfs/xattr.c:882 [inline]
reiserfs_xattr_init+0x331/0x720 fs/reiserfs/xattr.c:1005
reiserfs_fill_super+0x1f81/0x2340 fs/reiserfs/super.c:2175
mount_bdev+0x287/0x3c0 fs/super.c:1443
legacy_get_tree+0xe6/0x180 fs/fs_context.c:632
vfs_get_tree+0x88/0x270 fs/super.c:1573
do_new_mount+0x24a/0xa40 fs/namespace.c:3063
do_mount fs/namespace.c:3406 [inline]
__do_sys_mount fs/namespace.c:3614 [inline]
__se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3591
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
RIP: 0033:0x7fb738f9014a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb739ea4e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fb739ea4ef0 RCX: 00007fb738f9014a
RDX: 0000200000001100 RSI: 0000200000000040 RDI: 00007fb739ea4eb0
RBP: 0000200000001100 R08: 00007fb739ea4ef0 R09: 0000000000000002
R10: 0000000000000002 R11: 0000000000000246 R12: 0000200000000040
R13: 00007fb739ea4eb0 R14: 000000000000110f R15: 00002000000000c0
</TASK>
Allocated by task 15015:
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_lru+0x11a/0x2e0 mm/slub.c:3429
alloc_inode_sb include/linux/fs.h:3245 [inline]
f2fs_alloc_inode+0x151/0x520 fs/f2fs/super.c:1419
alloc_inode fs/inode.c:261 [inline]
iget_locked+0x1a9/0x830 fs/inode.c:1373
f2fs_iget+0x52/0x4a00 fs/f2fs/inode.c:483
f2fs_fill_super+0x4849/0x6b20 fs/f2fs/super.c:4409
mount_bdev+0x287/0x3c0 fs/super.c:1443
legacy_get_tree+0xe6/0x180 fs/fs_context.c:632
vfs_get_tree+0x88/0x270 fs/super.c:1573
do_new_mount+0x24a/0xa40 fs/namespace.c:3063
do_mount fs/namespace.c:3406 [inline]
__do_sys_mount fs/namespace.c:3614 [inline]
__se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3591
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
Last potentially related work creation:
kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486
call_rcu+0x154/0x980 kernel/rcu/tree.c:2849
destroy_inode fs/inode.c:316 [inline]
evict+0x7da/0x870 fs/inode.c:720
f2fs_fill_super+0x54a1/0x6b20 fs/f2fs/super.c:4592
mount_bdev+0x287/0x3c0 fs/super.c:1443
legacy_get_tree+0xe6/0x180 fs/fs_context.c:632
vfs_get_tree+0x88/0x270 fs/super.c:1573
do_new_mount+0x24a/0xa40 fs/namespace.c:3063
do_mount fs/namespace.c:3406 [inline]
__do_sys_mount fs/namespace.c:3614 [inline]
__se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3591
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 ffff88805c699aa0
which belongs to the cache f2fs_inode_cache of size 2144
The buggy address is located 1872 bytes inside of
2144-byte region [ffff88805c699aa0, ffff88805c69a300)
The buggy address belongs to the physical page:
page:ffffea000171a600 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88805c69ac60 pfn:0x5c698
head:ffffea000171a600 order:3 compound_mapcount:0 compound_pincount:0
memcg:ffff88807cc6f201
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000122 ffff8881413bf280
raw: ffff88805c69ac60 00000000800e0007 00000001ffffffff ffff88807cc6f201
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Reclaimable, gfp_mask 0x1d2050(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 14829, tgid 14828 (syz.3.2438), ts 1257662592664, free_ts 1251311103940
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_lru+0x1ae/0x2e0 mm/slub.c:3429
alloc_inode_sb include/linux/fs.h:3245 [inline]
f2fs_alloc_inode+0x151/0x520 fs/f2fs/super.c:1419
alloc_inode fs/inode.c:261 [inline]
iget_locked+0x1a9/0x830 fs/inode.c:1373
f2fs_iget+0x52/0x4a00 fs/f2fs/inode.c:483
f2fs_fill_super+0x3cdf/0x6b20 fs/f2fs/super.c:4307
mount_bdev+0x287/0x3c0 fs/super.c:1443
legacy_get_tree+0xe6/0x180 fs/fs_context.c:632
vfs_get_tree+0x88/0x270 fs/super.c:1573
do_new_mount+0x24a/0xa40 fs/namespace.c:3063
do_mount fs/namespace.c:3406 [inline]
__do_sys_mount fs/namespace.c:3614 [inline]
__se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3591
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
qlink_free mm/kasan/quarantine.c:168 [inline]
qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187
kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294
__kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:305
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]
__kmem_cache_alloc_node+0x140/0x260 mm/slub.c:3437
__do_kmalloc_node mm/slab_common.c:935 [inline]
__kmalloc+0xa0/0x240 mm/slab_common.c:949
kmalloc include/linux/slab.h:568 [inline]
tomoyo_realpath_from_path+0xdf/0x5d0 security/tomoyo/realpath.c:251
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_perm+0x1fd/0x550 security/tomoyo/file.c:822
security_inode_getattr+0xcf/0x120 security/security.c:1361
vfs_getattr+0x26/0x3a0 fs/stat.c:158
vfs_fstat fs/stat.c:183 [inline]
__do_sys_newfstat fs/stat.c:447 [inline]
__se_sys_newfstat fs/stat.c:444 [inline]
__x64_sys_newfstat+0x102/0x1c0 fs/stat.c:444
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
Memory state around the buggy address:
ffff88805c69a080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88805c69a100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88805c69a180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88805c69a200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88805c69a280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================