------------[ cut here ]------------ kernel BUG at fs/buffer.c:553! FAT-fs (loop4): error, fat_get_cluster: invalid cluster chain (i_pos 77) FAT-fs (loop4): Filesystem has been set read-only invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 12431 Comm: syz-executor.4 Not tainted 4.19.118-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:mark_buffer_dirty_inode fs/buffer.c:553 [inline] RIP: 0010:mark_buffer_dirty_inode+0x2f8/0x3c0 fs/buffer.c:544 Code: 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 75 4d 48 89 6b 58 4c 89 ef e8 c2 8d 6b 05 e9 00 fe ff ff e8 f8 34 b3 ff <0f> 0b 4c 89 ff e8 de 05 e9 ff e9 e5 fd ff ff e8 d4 05 e9 ff e9 6e RSP: 0018:ffff888041207ae0 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffff8880825a6f18 RCX: ffffc9000e33c000 RDX: 0000000000040000 RSI: ffffffff81b474a8 RDI: ffff888040fb3478 RBP: ffff888040fb3318 R08: 0000000000000000 R09: 0000000000000003 R10: ffffed1015ce4732 R11: ffff8880ae723993 R12: ffff8880a2c294e0 R13: 0000000000000000 R14: dffffc0000000000 R15: ffff888041207c48 FS: 00007f092001b700(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000096e90000 CR4: 00000000001426e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: fat_alloc_clusters+0x5d0/0xe50 fs/fat/fatent.c:503 fat_add_cluster+0x6d/0xf0 fs/fat/inode.c:101 fat_fallocate+0x26d/0x310 fs/fat/file.c:300 vfs_fallocate+0x484/0x990 fs/open.c:308 ksys_fallocate+0x51/0x90 fs/open.c:331 __do_sys_fallocate fs/open.c:339 [inline] __se_sys_fallocate fs/open.c:337 [inline] __x64_sys_fallocate+0x93/0xf0 fs/open.c:337 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c829 Code: 0d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f092001ac78 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00000000004db640 RCX: 000000000045c829 RDX: 0000000000000000 RSI: 0000000100000001 RDI: 0000000000000004 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 000000002811ffff R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000000ae R14: 00000000004c33e0 R15: 00007f092001b6d4 Modules linked in: audit: type=1804 audit(1587973844.899:102): pid=12482 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op=invalid_pcr cause=ToMToU comm="syz-executor.4" name="/root/syzkaller-testdir508154176/syzkaller.X5a3aJ/106/file0/file0" dev="loop4" ino=115 res=1 FAT-fs (loop4): error, fat_get_cluster: invalid cluster chain (i_pos 77) FAT-fs (loop4): error, fat_get_cluster: invalid cluster chain (i_pos 77) FAT-fs (loop4): error, fat_get_cluster: invalid cluster chain (i_pos 77) ---[ end trace 378ec9ab6e284959 ]--- RIP: 0010:mark_buffer_dirty_inode fs/buffer.c:553 [inline] RIP: 0010:mark_buffer_dirty_inode+0x2f8/0x3c0 fs/buffer.c:544 Code: 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 75 4d 48 89 6b 58 4c 89 ef e8 c2 8d 6b 05 e9 00 fe ff ff e8 f8 34 b3 ff <0f> 0b 4c 89 ff e8 de 05 e9 ff e9 e5 fd ff ff e8 d4 05 e9 ff e9 6e RSP: 0018:ffff888041207ae0 EFLAGS: 00010246 FAT-fs (loop4): error, fat_get_cluster: invalid cluster chain (i_pos 77) RAX: 0000000000040000 RBX: ffff8880825a6f18 RCX: ffffc9000e33c000 FAT-fs (loop4): error, fat_get_cluster: invalid cluster chain (i_pos 77) RDX: 0000000000040000 RSI: ffffffff81b474a8 RDI: ffff888040fb3478 RBP: ffff888040fb3318 R08: 0000000000000000 R09: 0000000000000003 FAT-fs (loop4): error, fat_get_cluster: invalid cluster chain (i_pos 77) R10: ffffed1015ce4732 R11: ffff8880ae723993 R12: ffff8880a2c294e0 FAT-fs (loop4): error, fat_get_cluster: invalid cluster chain (i_pos 77) R13: 0000000000000000 R14: dffffc0000000000 R15: ffff888041207c48 FAT-fs (loop4): error, fat_get_cluster: invalid cluster chain (i_pos 77) FS: 00007f092001b700(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000 FAT-fs (loop4): error, fat_get_cluster: invalid cluster chain (i_pos 77) CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f38c6425db8 CR3: 0000000096e90000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400