EXT4-fs error (device loop6): ext4_map_blocks:617: inode #4: block 12: comm syz.6.1609: lblock 1 mapped to illegal pblock 12 (length 1) Quota error (device loop6): qtree_write_dquot: dquota write failed EXT4-fs error (device loop6) in ext4_reserve_inode_write:6102: Corrupt filesystem ------------[ cut here ]------------ kernel BUG at fs/ext4/ext4.h:2985! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 6996 Comm: syz.6.1609 Tainted: G W 5.4.292-syzkaller-00021-gcd8e74fa0fa3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 RIP: 0010:ext4_get_group_info fs/ext4/ext4.h:2985 [inline] RIP: 0010:ext4_mb_find_by_goal+0x968/0x9a0 fs/ext4/mballoc.c:1830 Code: fc ff ff 89 d1 80 e1 07 80 c1 03 38 c1 0f 8c 14 fd ff ff 48 8b 7d b0 e8 f6 31 cc ff 48 8b 55 b0 e9 02 fd ff ff e8 d8 37 9e ff <0f> 0b e8 d1 37 9e ff 0f 0b e8 ca 37 9e ff 0f 0b e8 c3 37 9e ff 0f RSP: 0018:ffff8881dbb0ec28 EFLAGS: 00010246 RAX: ffffffff81c14708 RBX: 00000000010b824e RCX: 0000000000080000 RDX: ffffc90000ffc000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffff8881dbb0ecc0 R08: dffffc0000000000 R09: ffff8881dbb0eda0 R10: ffffed103b761dbb R11: 1ffff1103b761db4 R12: 1ffff1103c7a7e7e R13: ffff8881e3d3f3f0 R14: 0000000000000001 R15: ffff8881dbb0eda0 FS: 00007fb45d5bb6c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fb45d599f98 CR3: 00000001ed5d0000 CR4: 00000000003426a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ext4_mb_regular_allocator+0x192/0xfb0 fs/ext4/mballoc.c:2131 ext4_mb_new_blocks+0x5a9/0x2e80 fs/ext4/mballoc.c:4600 ext4_ext_map_blocks+0x183c/0x63c0 fs/ext4/extents.c:4549 ext4_map_blocks+0x92d/0x1b00 fs/ext4/inode.c:661 _ext4_get_block+0x1bb/0x4b0 fs/ext4/inode.c:802 ext4_get_block+0x39/0x50 fs/ext4/inode.c:819 ext4_block_write_begin+0x5b8/0x1240 fs/ext4/inode.c:1213 ext4_write_begin+0x553/0x1700 fs/ext4/inode.c:1351 generic_perform_write+0x2b8/0x500 mm/filemap.c:3450 __generic_file_write_iter+0x24b/0x480 mm/filemap.c:3579 ext4_file_write_iter+0x468/0xf90 fs/ext4/file.c:270 call_write_iter include/linux/fs.h:1991 [inline] new_sync_write fs/read_write.c:483 [inline] __vfs_write+0x480/0x5d0 fs/read_write.c:496 vfs_write+0x20e/0x4c0 fs/read_write.c:558 ksys_write+0x140/0x240 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:620 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7fb45ef52969 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:00007fb45d5bb038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fb45f179fa0 RCX: 00007fb45ef52969 RDX: 0000000000000078 RSI: 0000200000000440 RDI: 0000000000000004 RBP: 00007fb45efd4ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fb45f179fa0 R15: 00007ffd9a9f7238 Modules linked in: ---[ end trace b6e33f5f7a61fafe ]--- RIP: 0010:ext4_get_group_info fs/ext4/ext4.h:2985 [inline] RIP: 0010:ext4_mb_find_by_goal+0x968/0x9a0 fs/ext4/mballoc.c:1830 Code: fc ff ff 89 d1 80 e1 07 80 c1 03 38 c1 0f 8c 14 fd ff ff 48 8b 7d b0 e8 f6 31 cc ff 48 8b 55 b0 e9 02 fd ff ff e8 d8 37 9e ff <0f> 0b e8 d1 37 9e ff 0f 0b e8 ca 37 9e ff 0f 0b e8 c3 37 9e ff 0f RSP: 0018:ffff8881dbb0ec28 EFLAGS: 00010246 RAX: ffffffff81c14708 RBX: 00000000010b824e RCX: 0000000000080000 RDX: ffffc90000ffc000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffff8881dbb0ecc0 R08: dffffc0000000000 R09: ffff8881dbb0eda0 R10: ffffed103b761dbb R11: 1ffff1103b761db4 R12: 1ffff1103c7a7e7e R13: ffff8881e3d3f3f0 R14: 0000000000000001 R15: ffff8881dbb0eda0 FS: 00007fb45d5bb6c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2c31dff8 CR3: 00000001ed5d0000 CR4: 00000000003426b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400