EXT4-fs error (device loop0): ext4_map_blocks:731: inode #19: block 237: comm syz-executor.0: lblock 45 mapped to illegal pblock 237 (length 1) ------------[ cut here ]------------ kernel BUG at fs/ext4/ext4.h:3332! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 18939 Comm: syz-executor.0 Not tainted 6.3.0-rc3-syzkaller-00317-g65aca32efdcb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 RIP: 0010:ext4_get_group_info+0x3c9/0x430 fs/ext4/ext4.h:3332 Code: ff 48 c7 c2 c0 9b 62 8a be 06 03 00 00 48 c7 c7 20 9c 62 8a c6 05 40 69 37 0c 01 e8 21 fd 38 ff e9 7e fd ff ff e8 47 03 58 ff <0f> 0b e8 c0 23 a8 ff e9 8f fc ff ff e8 b6 23 a8 ff e9 c9 fc ff ff RSP: 0018:ffffc900048df620 EFLAGS: 00010212 RAX: 000000000002886f RBX: 00000000fffffac6 RCX: ffffc900043e2000 RDX: 0000000000040000 RSI: ffffffff822a0269 RDI: 0000000000000004 RBP: ffff88808120c000 R08: 0000000000000004 R09: 0000000000000001 R10: 00000000fffffac6 R11: 0000000000000000 R12: ffff888035e42000 R13: ffff888035e42678 R14: 0000000000000001 R15: dffffc0000000000 FS: 00007fa7704d5700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002002d000 CR3: 0000000081aeb000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ext4_mb_load_buddy_gfp+0xc9/0x1350 fs/ext4/mballoc.c:1448 ext4_discard_preallocations+0x9f9/0x1060 fs/ext4/mballoc.c:5021 ext4_truncate+0xd5a/0x1340 fs/ext4/inode.c:4339 ext4_truncate_failed_write fs/ext4/truncate.h:22 [inline] ext4_write_begin+0xa15/0x1000 fs/ext4/inode.c:1262 ext4_da_write_begin+0x222/0xa10 fs/ext4/inode.c:3057 generic_perform_write+0x256/0x570 mm/filemap.c:3926 ext4_buffered_write_iter+0x15b/0x460 fs/ext4/file.c:289 ext4_file_write_iter+0xbe0/0x1740 fs/ext4/file.c:710 call_write_iter include/linux/fs.h:1851 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x9ed/0xe10 fs/read_write.c:584 ksys_write+0x12b/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fa76f68c0f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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:00007fa7704d5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fa76f7abf80 RCX: 00007fa76f68c0f9 RDX: 000000000208e24b RSI: 0000000020000000 RDI: 0000000000000006 RBP: 00007fa76f6e7b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdaeec388f R14: 00007fa7704d5300 R15: 0000000000022000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:ext4_get_group_info+0x3c9/0x430 fs/ext4/ext4.h:3332 Code: ff 48 c7 c2 c0 9b 62 8a be 06 03 00 00 48 c7 c7 20 9c 62 8a c6 05 40 69 37 0c 01 e8 21 fd 38 ff e9 7e fd ff ff e8 47 03 58 ff <0f> 0b e8 c0 23 a8 ff e9 8f fc ff ff e8 b6 23 a8 ff e9 c9 fc ff ff RSP: 0018:ffffc900048df620 EFLAGS: 00010212 RAX: 000000000002886f RBX: 00000000fffffac6 RCX: ffffc900043e2000 RDX: 0000000000040000 RSI: ffffffff822a0269 RDI: 0000000000000004 RBP: ffff88808120c000 R08: 0000000000000004 R09: 0000000000000001 R10: 00000000fffffac6 R11: 0000000000000000 R12: ffff888035e42000 R13: ffff888035e42678 R14: 0000000000000001 R15: dffffc0000000000 FS: 00007fa7704d5700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2c748000 CR3: 0000000081aeb000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400