EXT4-fs error (device loop2): ext4_map_blocks:716: inode #17: block 329: comm syz-executor.2: lblock 201 mapped to illegal pblock 329 (length 1) ------------[ cut here ]------------ kernel BUG at fs/ext4/ext4.h:3371! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 4870 Comm: syz-executor.2 Not tainted 5.18.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:ext4_get_group_info+0x280/0x2e0 fs/ext4/ext4.h:3371 Code: 0f 85 a8 fe ff ff 48 c7 c2 a0 1b 00 89 be b7 02 00 00 48 c7 c7 00 1c 00 89 c6 05 e4 38 97 0a 01 e8 cb 50 4e 06 e9 84 fe ff ff <0f> 0b e8 e9 a9 b2 ff e9 d4 fd ff ff e8 df a9 b2 ff e9 fc fd ff ff RSP: 0018:ffffc90004b775c8 EFLAGS: 00010213 RAX: 0000000000000000 RBX: ffff88807913c000 RCX: 0000000000000001 RDX: 1ffff1100f227808 RSI: 00000000fffff95a RDI: ffff88807913c040 RBP: ffff88807913a000 R08: 0000000000000000 R09: ffff888070c811bb R10: ffffed100e190237 R11: 000000000000005c R12: 00000000fffff95a R13: ffff88807913a678 R14: 00000000fffff95a R15: 00000000fffff95a FS: 00007fed48457700(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000001b7a708 CR3: 0000000063c3f000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ext4_mb_load_buddy_gfp+0xc4/0xf50 fs/ext4/mballoc.c:1494 ext4_discard_preallocations+0x819/0xe40 fs/ext4/mballoc.c:5030 ext4_truncate+0x4c5/0x10c0 fs/ext4/inode.c:4235 ext4_truncate_failed_write fs/ext4/truncate.h:22 [inline] ext4_write_begin+0x7a1/0xc50 fs/ext4/inode.c:1235 ext4_da_write_begin+0x46b/0x880 fs/ext4/inode.c:2950 generic_perform_write+0x209/0x490 mm/filemap.c:3787 ext4_buffered_write_iter+0x122/0x2c0 fs/ext4/file.c:270 ext4_file_write_iter+0x39d/0x1190 fs/ext4/file.c:679 call_write_iter include/linux/fs.h:2050 [inline] new_sync_write+0x2e0/0x520 fs/read_write.c:504 vfs_write+0x607/0x8f0 fs/read_write.c:591 ksys_write+0xee/0x1c0 fs/read_write.c:644 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665e9 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fed48457188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 000000000d4ba0ff RSI: 00000000200009c0 RDI: 0000000000000007 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007fff42cba46f R14: 00007fed48457300 R15: 0000000000022000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:ext4_get_group_info+0x280/0x2e0 fs/ext4/ext4.h:3371 Code: 0f 85 a8 fe ff ff 48 c7 c2 a0 1b 00 89 be b7 02 00 00 48 c7 c7 00 1c 00 89 c6 05 e4 38 97 0a 01 e8 cb 50 4e 06 e9 84 fe ff ff <0f> 0b e8 e9 a9 b2 ff e9 d4 fd ff ff e8 df a9 b2 ff e9 fc fd ff ff RSP: 0018:ffffc90004b775c8 EFLAGS: 00010213 RAX: 0000000000000000 RBX: ffff88807913c000 RCX: 0000000000000001 RDX: 1ffff1100f227808 RSI: 00000000fffff95a RDI: ffff88807913c040 RBP: ffff88807913a000 R08: 0000000000000000 R09: ffff888070c811bb R10: ffffed100e190237 R11: 000000000000005c R12: 00000000fffff95a R13: ffff88807913a678 R14: 00000000fffff95a R15: 00000000fffff95a FS: 00007fed48457700(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000543038 CR3: 0000000063c3f000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400