------------[ cut here ]------------ kernel BUG at fs/ext4/inode.c:2794! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 7 Comm: kworker/u4:0 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 Workqueue: writeback wb_workfn (flush-7:4) RIP: 0010:ext4_writepages+0x2d31/0x37f0 fs/ext4/inode.c:2794 Code: 00 fc ff df 44 89 64 24 18 48 c1 ea 03 80 3c 02 00 0f 84 25 da ff ff 48 8b 3c 24 e8 89 2d b8 ff e9 17 da ff ff e8 8f 50 82 ff <0f> 0b 4c 8b b4 24 20 01 00 00 e8 80 50 82 ff 0f b6 ac 24 50 02 00 RSP: 0000:ffff8880b5a47500 EFLAGS: 00010293 RAX: ffff8880b5a361c0 RBX: 0000000000000001 RCX: ffffffff81e03070 RDX: 0000000000000000 RSI: ffffffff81e034e1 RDI: 0000000000000007 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000001 R13: dffffc0000000000 R14: ffff88804ab0c730 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000555555e61708 CR3: 000000004da8d000 CR4: 00000000003406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: do_writepages+0xe5/0x290 mm/page-writeback.c:2344 __writeback_single_inode+0x10c/0x11d0 fs/fs-writeback.c:1385 writeback_sb_inodes+0x537/0xef0 fs/fs-writeback.c:1647 wb_writeback+0x28d/0xcc0 fs/fs-writeback.c:1820 wb_do_writeback fs/fs-writeback.c:1965 [inline] wb_workfn+0x29b/0x1250 fs/fs-writeback.c:2006 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Modules linked in: ---[ end trace 0ee2bcdf1ff3c311 ]--- RIP: 0010:ext4_writepages+0x2d31/0x37f0 fs/ext4/inode.c:2794 Code: 00 fc ff df 44 89 64 24 18 48 c1 ea 03 80 3c 02 00 0f 84 25 da ff ff 48 8b 3c 24 e8 89 2d b8 ff e9 17 da ff ff e8 8f 50 82 ff <0f> 0b 4c 8b b4 24 20 01 00 00 e8 80 50 82 ff 0f b6 ac 24 50 02 00 RSP: 0000:ffff8880b5a47500 EFLAGS: 00010293 RAX: ffff8880b5a361c0 RBX: 0000000000000001 RCX: ffffffff81e03070 RDX: 0000000000000000 RSI: ffffffff81e034e1 RDI: 0000000000000007 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000001 R13: dffffc0000000000 R14: ffff88804ab0c730 R15: 0000000000000000 kauditd_printk_skb: 164 callbacks suppressed audit: type=1804 audit(1676829211.629:2492): pid=28089 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.0" name="/root/syzkaller-testdir3057916357/syzkaller.VJYfRP/319/file0/bus" dev="loop0" ino=18 res=1 EXT4-fs error (device loop0): ext4_mb_generate_buddy:744: group 0, block bitmap and bg descriptor inconsistent: 25 vs 150994969 free clusters netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. FS: 0000000000000000(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f8dfd600000 CR3: 0000000097f84000 CR4: 00000000003406f0 EXT4-fs (loop0): Delayed block allocation failed for inode 18 at logical offset 0 with max blocks 1 with error 28 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 audit: type=1804 audit(1676829211.639:2493): pid=28089 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.0" name="/root/syzkaller-testdir3057916357/syzkaller.VJYfRP/319/file0/bus" dev="loop0" ino=18 res=1 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Total free blocks count 0 EXT4-fs (loop0): Free/Dirty block details EXT4-fs (loop0): free_blocks=2415919104 EXT4-fs (loop0): dirty_blocks=16 EXT4-fs (loop0): Block reservation details EXT4-fs (loop0): i_reserved_data_blocks=1