syzbot
KASAN: use-after-free Read in ext4_convert_inline_data_nolock (2)
Status:
upstream: reported C repro on 2026/06/22 03:50
Reported-by: syzbot+665d102f317bbf32f73d@syzkaller.appspotmail.com
First crash: 51d, last: 4d15h
▶
▼
Fix bisection attempts (1)
Sample crash report:
EXT4-fs: Warning: mounting with data=journal disables delayed allocation, dioread_nolock, O_DIRECT and fast_commit support!
EXT4-fs (loop2): encrypted files will use data=ordered instead of data journaling mode
EXT4-fs (loop2): 1 truncate cleaned up
EXT4-fs (loop2): mounted filesystem without journal. Opts: noblock_validity,max_batch_time=0x0000000000000002,lazytime,block_validity,stripe=0x000000000000000d,nombcache,,errors=continue. Quota mode: none.
==================================================================
BUG: KASAN: use-after-free in ext4_read_inline_data fs/ext4/inline.c:210 [inline]
BUG: KASAN: use-after-free in ext4_convert_inline_data_nolock+0x313/0xcd0 fs/ext4/inline.c:1255
Read of size 68 at addr ffff88811e843c80 by task syz.2.17/372
CPU: 1 PID: 372 Comm: syz.2.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
<TASK>
__dump_stack+0x21/0x30 lib/dump_stack.c:88
dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:427 [inline]
kasan_report+0x10f/0x150 mm/kasan/report.c:444
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x249/0x2a0 mm/kasan/generic.c:189
memcpy+0x2d/0x70 mm/kasan/shadow.c:65
ext4_read_inline_data fs/ext4/inline.c:210 [inline]
ext4_convert_inline_data_nolock+0x313/0xcd0 fs/ext4/inline.c:1255
ext4_try_add_inline_entry+0x737/0xa70 fs/ext4/inline.c:1381
ext4_add_entry+0x711/0x1020 fs/ext4/namei.c:2458
ext4_mkdir+0x520/0xc90 fs/ext4/namei.c:3081
vfs_mkdir+0x38b/0x590 fs/namei.c:4073
do_mkdirat+0x174/0x4d0 fs/namei.c:4098
__do_sys_mkdirat fs/namei.c:4113 [inline]
__se_sys_mkdirat fs/namei.c:4111 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4111
x64_sys_call+0x37e/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7efe2019ecc7
Code: 00 66 90 48 89 f2 b9 00 01 00 00 48 89 fe bf 9c ff ff ff e9 db f7 ff ff 66 2e 0f 1f 84 00 00 00 00 00 90 b8 02 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcaacf4758 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007ffcaacf47e0 RCX: 00007efe2019ecc7
RDX: 00000000000001ff RSI: 0000200000000080 RDI: 00000000ffffff9c
RBP: 0000200000000140 R08: 0000200000000080 R09: 0000000000000000
R10: 0000200000000140 R11: 0000000000000246 R12: 0000200000000080
R13: 00007ffcaacf47a0 R14: 0000000000000000 R15: 0000000000000000
</TASK>
The buggy address belongs to the page:
page:ffffea00047a10c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11e843
flags: 0x4000000000000000(zone=1)
raw: 4000000000000000 ffffea00047a1108 ffffea00047a1088 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 339, ts 25955065291, free_ts 26029979128
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2607
prep_new_page+0x1c/0x110 mm/page_alloc.c:2613
get_page_from_freelist+0x2c3a/0x2cd0 mm/page_alloc.c:4487
__alloc_pages+0x1a2/0x460 mm/page_alloc.c:5824
vm_area_alloc_pages mm/vmalloc.c:-1 [inline]
__vmalloc_area_node mm/vmalloc.c:2981 [inline]
__vmalloc_node_range+0x507/0xad0 mm/vmalloc.c:3147
vmalloc_user+0x73/0x80 mm/vmalloc.c:3298
kcov_mmap+0x2b/0x130 kernel/kcov.c:474
call_mmap include/linux/fs.h:2217 [inline]
mmap_file+0x60/0xb0 mm/util.c:1099
__mmap_region mm/mmap.c:1808 [inline]
mmap_region+0xe42/0x1700 mm/mmap.c:2959
do_mmap+0x812/0xf10 mm/mmap.c:1598
vm_mmap_pgoff+0x1d6/0x410 mm/util.c:555
ksys_mmap_pgoff+0x161/0x1d0 mm/mmap.c:1647
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline]
__x64_sys_mmap+0xfa/0x110 arch/x86/kernel/sys_x86_64.c:86
x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:10
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1474 [inline]
free_pcp_prepare mm/page_alloc.c:1546 [inline]
free_unref_page_prepare+0x5fa/0x600 mm/page_alloc.c:3536
free_unref_page+0xae/0x540 mm/page_alloc.c:3618
free_the_page mm/page_alloc.c:805 [inline]
__free_pages+0x6c/0x100 mm/page_alloc.c:5900
__vunmap+0x801/0x980 mm/vmalloc.c:2660
__vfree mm/vmalloc.c:2709 [inline]
vfree+0x8b/0xc0 mm/vmalloc.c:2740
kcov_put kernel/kcov.c:417 [inline]
kcov_close+0x2b/0x50 kernel/kcov.c:519
__fput+0x22b/0x900 fs/file_table.c:311
____fput+0x15/0x20 fs/file_table.c:339
task_work_run+0x127/0x190 kernel/task_work.c:188
exit_task_work include/linux/task_work.h:33 [inline]
do_exit+0xb70/0x29a0 kernel/exit.c:890
do_group_exit+0x149/0x310 kernel/exit.c:1004
get_signal+0x64f/0x1430 kernel/signal.c:2907
arch_do_signal_or_restart+0xe2/0x1100 arch/x86/kernel/signal.c:867
handle_signal_work kernel/entry/common.c:154 [inline]
exit_to_user_mode_loop+0xa7/0xe0 kernel/entry/common.c:178
exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:214
__syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307
Memory state around the buggy address:
ffff88811e843b80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88811e843c00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88811e843c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88811e843d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88811e843d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
EXT4-fs error (device loop2): ext4_check_all_de:667: inode #12: block 7: comm syz.2.17: bad entry in directory: directory entry overrun - offset=0, inode=901261600, rec_len=7976, size=124 fake=0
* Struck through repros no longer work on HEAD.