request_module fs-gadgetfs succeeded, but still no fs?
loop0: detected capacity change from 0 to 512
EXT4-fs (loop0): 1 truncate cleaned up
EXT4-fs (loop0): mounted filesystem without journal. Opts: noauto_da_alloc,grpquota,errors=continue,noauto_da_alloc,nolazytime,errors=continue,grpjquota=,errors=remount-ro,nobarrier,. Quota mode: writeback.
==================================================================
BUG: KASAN: use-after-free in ext4_insert_dentry+0x392/0x710 fs/ext4/namei.c:2155
Write of size 254 at addr ffff88811d437f10 by task syz-executor404/293
CPU: 1 PID: 293 Comm: syz-executor404 Not tainted 5.15.178-syzkaller-00013-g7d1f9b5c2ff5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1c0 lib/dump_stack.c:106
print_address_description+0x87/0x3b0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:427 [inline]
kasan_report+0x179/0x1c0 mm/kasan/report.c:444
kasan_check_range+0x293/0x2a0 mm/kasan/generic.c:189
memcpy+0x44/0x70 mm/kasan/shadow.c:66
ext4_insert_dentry+0x392/0x710 fs/ext4/namei.c:2155
add_dirent_to_buf+0x384/0x7d0 fs/ext4/namei.c:2200
make_indexed_dir+0xf34/0x15a0 fs/ext4/namei.c:2398
ext4_add_entry+0xde2/0x12b0 fs/ext4/namei.c:2504
__ext4_link+0x4e9/0x790 fs/ext4/namei.c:3536
ext4_link+0x1f3/0x290 fs/ext4/namei.c:3577
vfs_link+0x645/0x7f0 fs/namei.c:4557
do_linkat+0x34d/0x9f0 fs/namei.c:4628
__do_sys_link fs/namei.c:4662 [inline]
__se_sys_link fs/namei.c:4660 [inline]
__x64_sys_link+0x86/0x90 fs/namei.c:4660
x64_sys_call+0x282/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:87
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f2d760c0669
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 1f 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd198ecba8 EFLAGS: 00000246 ORIG_RAX: 0000000000000056
RAX: ffffffffffffffda RBX: 00007f2d761045d2 RCX: 00007f2d760c0669
RDX: 0000000000000000 RSI: 0000400000000bc0 RDI: 0000400000000100
RBP: 00007f2d761045a2 R08: 00007f2d761043da R09: 00007f2d761043da
R10: 00007f2d761045a2 R11: 0000000000000246 R12: 00007f2d7610450a
R13: 00007ffd198ecc00 R14: 0000000000000001 R15: 0000000000000003
</TASK>
The buggy address belongs to the page:
page:ffffea0004750dc0 refcount:3 mapcount:0 mapping:ffff8881092c05d8 index:0x3f pfn:0x11d437
memcg:ffff888100248000
aops:def_blk_aops ino:700000
flags: 0x400000000000202a(referenced|dirty|active|private|zone=1)
raw: 400000000000202a 0000000000000000 dead000000000122 ffff8881092c05d8
raw: 000000000000003f ffff888120cf3a80 00000003ffffffff ffff888100248000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Movable, gfp_mask 0x108c48(GFP_NOFS|__GFP_NOFAIL|__GFP_HARDWALL|__GFP_MOVABLE), pid 293, ts 25299215236, free_ts 18963071374
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2605
prep_new_page+0x1b/0x110 mm/page_alloc.c:2611
get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4485
__alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5780
__alloc_pages_node include/linux/gfp.h:591 [inline]
alloc_pages_node include/linux/gfp.h:605 [inline]
alloc_pages include/linux/gfp.h:618 [inline]
__page_cache_alloc include/linux/pagemap.h:305 [inline]
pagecache_get_page+0xb18/0xeb0 mm/filemap.c:1946
find_or_create_page include/linux/pagemap.h:418 [inline]
grow_dev_page fs/buffer.c:949 [inline]
grow_buffers fs/buffer.c:1014 [inline]
__getblk_slow fs/buffer.c:1041 [inline]
__getblk_gfp+0x21e/0x7c0 fs/buffer.c:1336
sb_getblk include/linux/buffer_head.h:361 [inline]
ext4_getblk+0x259/0x700 fs/ext4/inode.c:877
ext4_bread+0x2f/0x180 fs/ext4/inode.c:923
ext4_append+0x31f/0x5b0 fs/ext4/namei.c:83
make_indexed_dir+0x515/0x15a0 fs/ext4/namei.c:2318
ext4_add_entry+0xde2/0x12b0 fs/ext4/namei.c:2504
__ext4_link+0x4e9/0x790 fs/ext4/namei.c:3536
ext4_link+0x1f3/0x290 fs/ext4/namei.c:3577
vfs_link+0x645/0x7f0 fs/namei.c:4557
do_linkat+0x34d/0x9f0 fs/namei.c:4628
__do_sys_link fs/namei.c:4662 [inline]
__se_sys_link fs/namei.c:4660 [inline]
__x64_sys_link+0x86/0x90 fs/namei.c:4660
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1472 [inline]
free_pcp_prepare mm/page_alloc.c:1544 [inline]
free_unref_page_prepare+0x7c8/0x7d0 mm/page_alloc.c:3534
free_unref_page_list+0x14b/0xa60 mm/page_alloc.c:3671
release_pages+0x1310/0x1370 mm/swap.c:1009
free_pages_and_swap_cache+0x8a/0xa0 mm/swap_state.c:320
tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:240 [inline]
tlb_flush_mmu mm/mmu_gather.c:247 [inline]
tlb_finish_mmu+0x177/0x320 mm/mmu_gather.c:338
unmap_region+0x304/0x350 mm/mmap.c:2680
__do_munmap+0x13e4/0x19d0 mm/mmap.c:2913
__vm_munmap+0x166/0x2a0 mm/mmap.c:2966
__do_sys_munmap mm/mmap.c:2992 [inline]
__se_sys_munmap mm/mmap.c:2988 [inline]
__x64_sys_munmap+0x6b/0x80 mm/mmap.c:2988
x64_sys_call+0x75/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:12
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
Memory state around the buggy address:
ffff88811d437f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88811d437f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88811d438000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88811d438080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88811d438100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
===========