audit: type=1804 audit(1671604939.087:4): pid=9846 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir2604930537/syzkaller.U0awof/15/file0/bus" dev="loop5" ino=18 res=1 audit: type=1804 audit(1671604939.087:5): pid=9800 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir2604930537/syzkaller.U0awof/15/file0/bus" dev="loop5" ino=18 res=1 ------------[ cut here ]------------ kernel BUG at fs/ext4/inode.c:2861! EXT4-fs (loop0): Delayed block allocation failed for inode 18 at logical offset 0 with max blocks 1 with error 28 invalid opcode: 0000 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 1 PID: 9800 Comm: syz-executor.5 Not tainted 4.14.302-syzkaller #0 EXT4-fs (loop0): This should not happen!! Data will be lost Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 task: ffff8880462b2200 task.stack: ffff8880462b8000 RIP: 0010:ext4_writepages+0x27fc/0x32a0 fs/ext4/inode.c:2861 RSP: 0018:ffff8880462bf1b0 EFLAGS: 00010216 EXT4-fs (loop0): Total free blocks count 0 EXT4-fs (loop0): Free/Dirty block details RAX: 0000000000040000 RBX: 00000000a802c010 RCX: ffffc90005fd8000 RDX: 00000000000212e9 RSI: ffffffff81bb643c RDI: ffff8880462b3208 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000050510 R10: ffff8880462b2ab0 R11: ffff8880462b2200 R12: 0000000000000001 R13: dffffc0000000000 R14: ffff888046947430 R15: ffff8880462bf5d8 FS: 00007ff275509700(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 EXT4-fs (loop0): free_blocks=2415919104 CR2: 0000559c03e68160 CR3: 00000000a9e24000 CR4: 00000000003406e0 EXT4-fs (loop0): dirty_blocks=16 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: EXT4-fs (loop0): Block reservation details EXT4-fs (loop0): i_reserved_data_blocks=1 syz-executor.0 (9798) used greatest stack depth: 24312 bytes left do_writepages+0xc3/0x240 mm/page-writeback.c:2361 audit: type=1804 audit(1671604939.167:6): pid=9846 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir2604930537/syzkaller.U0awof/15/file0/bus" dev="loop5" ino=18 res=1 __filemap_fdatawrite_range+0x236/0x310 mm/filemap.c:346 file_write_and_wait_range+0x86/0xd0 mm/filemap.c:678 audit: type=1804 audit(1671604939.177:7): pid=9846 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir2604930537/syzkaller.U0awof/15/file0/bus" dev="loop5" ino=18 res=1 __generic_file_fsync+0x70/0x190 fs/libfs.c:985 ext4_sync_file+0x8ed/0x12c0 fs/ext4/fsync.c:118 vfs_fsync_range+0x103/0x260 fs/sync.c:196 generic_write_sync include/linux/fs.h:2684 [inline] ext4_file_write_iter+0x5fa/0xd20 fs/ext4/file.c:281 call_write_iter include/linux/fs.h:1780 [inline] do_iter_readv_writev+0x4cf/0x5f0 fs/read_write.c:675 do_iter_write+0x152/0x550 fs/read_write.c:954 vfs_iter_write+0x70/0xa0 fs/read_write.c:967 iter_file_splice_write+0x52b/0xa90 fs/splice.c:749 do_splice_from fs/splice.c:851 [inline] direct_splice_actor+0x115/0x160 fs/splice.c:1018 splice_direct_to_actor+0x27c/0x730 fs/splice.c:973 do_splice_direct+0x164/0x210 fs/splice.c:1061 do_sendfile+0x47f/0xb30 fs/read_write.c:1441 SYSC_sendfile64 fs/read_write.c:1502 [inline] SyS_sendfile64+0xff/0x110 fs/read_write.c:1488 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7ff276f970d9 RSP: 002b:00007ff275509168 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007ff2770b6f80 RCX: 00007ff276f970d9 RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000007 RBP: 00007ff276ff2ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000001ffff R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdebfa5eef R14: 00007ff275509300 R15: 0000000000022000 Code: ff ff 4c 89 ff e8 25 b7 c3 ff e9 98 db ff ff e8 1b f6 99 ff 48 8b bc 24 b8 00 00 00 e8 0e 5d b1 ff e9 18 f5 ff ff e8 04 f6 99 ff <0f> 0b e8 fd f5 99 ff 48 8b bc 24 b8 00 00 00 e8 f0 5c b1 ff 8b RIP: ext4_writepages+0x27fc/0x32a0 fs/ext4/inode.c:2861 RSP: ffff8880462bf1b0 ---[ end trace 11855443054135d9 ]---