EXT4-fs error (device loop1): ext4_map_blocks:718: inode #18: block 330: comm syz-executor403: lblock 218 mapped to illegal pblock 330 (length 1) ------------[ cut here ]------------ kernel BUG at fs/ext4/ext4.h:3248! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 8253 Comm: syz-executor403 Not tainted 5.10.161-syzkaller-00019-g416c4356f372 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 RIP: 0010:ext4_get_group_info fs/ext4/ext4.h:3248 [inline] RIP: 0010:ext4_mb_load_buddy_gfp+0xe54/0xec0 fs/ext4/mballoc.c:1174 Code: ff e8 40 13 c8 ff e9 c8 f3 ff ff 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 14 f4 ff ff e8 46 13 c8 ff e9 0a f4 ff ff e8 ec 10 8e ff <0f> 0b e8 e5 10 8e ff 4c 89 ef e8 5d 64 cd ff e9 34 fc ff ff e8 d3 RSP: 0018:ffffc900079b7078 EFLAGS: 00010293 RAX: ffffffff81df10c4 RBX: 0000000000000001 RCX: ffff8881041be2c0 RDX: 0000000000000000 RSI: 00000000fffff277 RDI: 0000000000000001 RBP: ffffc900079b7110 R08: ffffffff81df034c R09: ffffed102430396c R10: ffffed102430396c R11: 1ffff1102430396b R12: 1ffff11023ec3c79 R13: ffff88810b150000 R14: 00000000fffff277 R15: dffffc0000000000 FS: 00007f82fc0c8700(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000559cbb4bf0b8 CR3: 0000000121192000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ext4_discard_preallocations+0x803/0xf10 fs/ext4/mballoc.c:4451 ext4_truncate+0xa8b/0x1270 fs/ext4/inode.c:4353 ext4_truncate_failed_write fs/ext4/truncate.h:20 [inline] ext4_write_begin+0xd12/0x16f0 fs/ext4/inode.c:1254 ext4_da_write_begin+0x4a8/0xf10 fs/ext4/inode.c:3022 generic_perform_write+0x309/0x5b0 mm/filemap.c:3468 ext4_buffered_write_iter+0x47c/0x610 fs/ext4/file.c:272 ext4_file_write_iter+0x192/0x1c70 fs/ext4/file.c:689 call_write_iter include/linux/fs.h:1969 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0xc4a/0xf80 fs/read_write.c:605 ksys_write+0x198/0x2c0 fs/read_write.c:658 __do_sys_write fs/read_write.c:670 [inline] __se_sys_write fs/read_write.c:667 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:667 do_syscall_64+0x34/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xc6 RIP: 0033:0x7f8304448d79 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 18 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:00007f82fc0c8208 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f83044c7798 RCX: 00007f8304448d79 RDX: 000000000208e24b RSI: 00000000200000c0 RDI: 0000000000000005 RBP: 00007f83044c7790 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f83044c779c R13: 00007ffdbb4c5abf R14: 00007f82fc0c8300 R15: 0000000000022000 Modules linked in: ---[ end trace 58a81f5d9121e42a ]--- RIP: 0010:ext4_get_group_info fs/ext4/ext4.h:3248 [inline] RIP: 0010:ext4_mb_load_buddy_gfp+0xe54/0xec0 fs/ext4/mballoc.c:1174 Code: ff e8 40 13 c8 ff e9 c8 f3 ff ff 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 14 f4 ff ff e8 46 13 c8 ff e9 0a f4 ff ff e8 ec 10 8e ff <0f> 0b e8 e5 10 8e ff 4c 89 ef e8 5d 64 cd ff e9 34 fc ff ff e8 d3 RSP: 0018:ffffc900079b7078 EFLAGS: 00010293 RAX: ffffffff81df10c4 RBX: 0000000000000001 RCX: ffff8881041be2c0 RDX: 0000000000000000 RSI: 00000000fffff277 RDI: 0000000000000001 RBP: ffffc900079b7110 R08: ffffffff81df034c R09: ffffed102430396c R10: ffffed102430396c R11: 1ffff1102430396b R12: 1ffff11023ec3c79 R13: ffff88810b150000 R14: 00000000fffff277 R15: dffffc0000000000 FS: 00007f82fc0c8700(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f8304492488 CR3: 0000000121192000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400