EXT4-fs error (device loop0): ext4_find_extent:939: inode #16: comm syz.0.6: pblk 401 bad header/extent: invalid extent entries - magic f30a, entries 19, max 84(84), depth 0(0)
------------[ cut here ]------------
kernel BUG at fs/ext4/extents.c:3206!
Oops: invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 1 UID: 0 PID: 5971 Comm: syz.0.6 Not tainted 6.16.0-rc5-syzkaller-00193-g40f92e79b0aa #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:ext4_split_extent_at+0xf42/0xf70 fs/ext4/extents.c:3206
Code: 89 f9 80 e1 07 fe c1 38 c1 0f 8c 50 fb ff ff 4c 89 ff e8 61 01 b5 ff e9 43 fb ff ff e8 c7 a9 53 ff 90 0f 0b e8 bf a9 53 ff 90 <0f> 0b e8 b7 a9 53 ff 90 0f 0b e8 af a9 53 ff 90 0f 0b e8 a7 a9 53
RSP: 0018:ffffc90004b96ae0 EFLAGS: 00010283
RAX: ffffffff826c8b91 RBX: 0000000000000061 RCX: 0000000000080000
RDX: ffffc9000bbb9000 RSI: 000000000002387f RDI: 0000000000023880
RBP: ffffc90004b96c38 R08: 0000000000000003 R09: 0000000000000000
R10: ffffc90004b96bc0 R11: fffff52000972d79 R12: ffff88805ed88100
R13: 0000000000000060 R14: 0000000000008001 R15: 0000000000000030
FS: 00007f5b725db6c0(0000) GS:ffff888125d4f000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b305feff8 CR3: 0000000029922000 CR4: 00000000003526f0
Call Trace:
<TASK>
ext4_split_extent+0x23f/0x6e0 fs/ext4/extents.c:3406
ext4_split_convert_extents fs/ext4/extents.c:3743 [inline]
ext4_ext_handle_unwritten_extents fs/ext4/extents.c:3915 [inline]
ext4_ext_map_blocks+0x1db2/0x6ac0 fs/ext4/extents.c:4274
ext4_map_create_blocks fs/ext4/inode.c:609 [inline]
ext4_map_blocks+0x931/0x18d0 fs/ext4/inode.c:813
mpage_map_one_extent fs/ext4/inode.c:2348 [inline]
mpage_map_and_submit_extent fs/ext4/inode.c:2401 [inline]
ext4_do_writepages+0x212f/0x3f30 fs/ext4/inode.c:2863
ext4_writepages+0x205/0x350 fs/ext4/inode.c:2953
do_writepages+0x32b/0x550 mm/page-writeback.c:2636
filemap_fdatawrite_wbc mm/filemap.c:386 [inline]
__filemap_fdatawrite_range mm/filemap.c:419 [inline]
file_write_and_wait_range+0x22c/0x330 mm/filemap.c:794
generic_buffers_fsync_noflush+0x6c/0x180 fs/buffer.c:609
ext4_fsync_nojournal fs/ext4/fsync.c:88 [inline]
ext4_sync_file+0x332/0xb20 fs/ext4/fsync.c:147
generic_write_sync include/linux/fs.h:3031 [inline]
ext4_buffered_write_iter+0x2ca/0x3a0 fs/ext4/file.c:305
ext4_file_write_iter+0x298/0x1bc0 fs/ext4/file.c:-1
new_sync_write fs/read_write.c:593 [inline]
vfs_write+0x548/0xa90 fs/read_write.c:686
ksys_pwrite64 fs/read_write.c:793 [inline]
__do_sys_pwrite64 fs/read_write.c:801 [inline]
__se_sys_pwrite64 fs/read_write.c:798 [inline]
__x64_sys_pwrite64+0x193/0x220 fs/read_write.c:798
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5b7178e929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5b725db038 EFLAGS: 00000246 ORIG_RAX: 0000000000000012
RAX: ffffffffffffffda RBX: 00007f5b719b5fa0 RCX: 00007f5b7178e929
RDX: 000000000000fdef RSI: 0000200000000140 RDI: 0000000000000007
RBP: 00007f5b71810b39 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000fecc R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f5b719b5fa0 R15: 00007ffc7a6a9448
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ext4_split_extent_at+0xf42/0xf70 fs/ext4/extents.c:3206
Code: 89 f9 80 e1 07 fe c1 38 c1 0f 8c 50 fb ff ff 4c 89 ff e8 61 01 b5 ff e9 43 fb ff ff e8 c7 a9 53 ff 90 0f 0b e8 bf a9 53 ff 90 <0f> 0b e8 b7 a9 53 ff 90 0f 0b e8 af a9 53 ff 90 0f 0b e8 a7 a9 53
RSP: 0018:ffffc90004b96ae0 EFLAGS: 00010283
RAX: ffffffff826c8b91 RBX: 0000000000000061 RCX: 0000000000080000
RDX: ffffc9000bbb9000 RSI: 000000000002387f RDI: 0000000000023880
RBP: ffffc90004b96c38 R08: 0000000000000003 R09: 0000000000000000
R10: ffffc90004b96bc0 R11: fffff52000972d79 R12: ffff88805ed88100
R13: 0000000000000060 R14: 0000000000008001 R15: 0000000000000030
FS: 00007f5b725db6c0(0000) GS:ffff888125d4f000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f45be5f1000 CR3: 0000000029922000 CR4: 00000000003526f0