attempt to access beyond end of device loop3: rw=2049, want=4821, limit=63 attempt to access beyond end of device loop3: rw=2049, want=6749, limit=63 ------------[ cut here ]------------ kernel BUG at fs/buffer.c:605! loop_reread_partitions: partition scan of loop0 (8b+?s=7]cIirn0jubx—Jt}̳cYUB) failed (rc=-16) invalid opcode: 0000 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 1 PID: 14408 Comm: syz-executor.0 Not tainted 4.14.183-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff888056c9c100 task.stack: ffff888050cb0000 RIP: 0010:mark_buffer_dirty_inode+0x2d8/0x3a0 fs/buffer.c:605 RSP: 0018:ffff888050cb74b8 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffff888042fff888 RCX: ffffc9000608f000 RDX: 0000000000040000 RSI: ffffffff8196da88 RDI: ffff88804b290480 attempt to access beyond end of device RBP: ffff88804b290320 R08: 0000000000000001 R09: 0000000000000004 R10: ffff888056c9ca28 R11: ffff888056c9c100 R12: ffff8880551446e8 R13: 0000000000000000 R14: ffff888050cb7600 R15: ffff888096c001c0 FS: 00007f88331fb700(0000) GS:ffff8880aed00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 loop4: rw=1, want=1353, limit=63 CR2: 000055f0e872a598 CR3: 000000009255e000 CR4: 00000000001426e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 00000000cb5e8b80 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: fat_alloc_clusters+0x51b/0xcf0 fs/fat/fatent.c:502 fat_add_cluster+0x5d/0xc0 fs/fat/inode.c:100 __fat_get_block fs/fat/inode.c:147 [inline] fat_get_block+0x28f/0x750 fs/fat/inode.c:176 input: syz1 as /devices/virtual/input/input10 __block_write_begin_int+0x33a/0x1000 fs/buffer.c:2038 __block_write_begin fs/buffer.c:2088 [inline] block_write_begin+0x58/0x260 fs/buffer.c:2147 cont_write_begin+0x480/0x720 fs/buffer.c:2497 fat_write_begin+0x89/0x110 fs/fat/inode.c:222 generic_perform_write+0x1c9/0x420 mm/filemap.c:3047 __generic_file_write_iter+0x227/0x590 mm/filemap.c:3172 generic_file_write_iter+0x36f/0x650 mm/filemap.c:3200 call_write_iter include/linux/fs.h:1778 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x44e/0x630 fs/read_write.c:482 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45ca69 RSP: 002b:00007f88331fac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000050c680 RCX: 000000000045ca69 RDX: 00000000fffffc41 RSI: 0000000020001440 RDI: 0000000000000004 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000ce0 R14: 00000000004cf306 R15: 00007f88331fb6d4 Code: fa 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 a2 72 a7 04 e9 20 fe ff ff e8 58 cb c3 ff <0f> 0b 4c 89 ff e8 2e 04 ed ff e9 05 fe ff ff e8 24 04 ed ff e9 RIP: mark_buffer_dirty_inode+0x2d8/0x3a0 fs/buffer.c:605 RSP: ffff888050cb74b8 uinput: write device info first ---[ end trace 98a0278fc7cbad8a ]---