sg_write: data in/out 917468/251 bytes for SCSI command 0x0-- guessing data in; program syz-executor.4 not setting count and/or reply_len properly ------------[ cut here ]------------ WARNING: CPU: 0 PID: 14201 at lib/iov_iter.c:376 _copy_from_iter+0x2b2/0x1140 Modules linked in: CPU: 0 PID: 14201 Comm: syz-executor.4 Not tainted 6.3.0-rc3-next-20230324 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:_copy_from_iter+0x2b2/0x1140 Code: 5d 41 5e 41 5f e9 82 ce 33 02 e8 19 91 36 ff be 7c 01 00 00 48 c7 c7 e0 c4 9e 84 e8 48 86 5a ff e9 51 fe ff ff e8 fe 90 36 ff <0f> 0b 45 31 f6 eb 87 e8 f2 90 36 ff 31 ff 89 ee e8 29 8c 36 ff 40 RSP: 0018:ffff8880440b7608 EFLAGS: 00010216 RAX: 0000000000003728 RBX: 0000000000000000 RCX: ffffc90008007000 RDX: 0000000000040000 RSI: ffffffff8214f722 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000001000 R13: ffff8880440b7838 R14: 0000000000001000 R15: ffff8880440b7838 FS: 00007f5d39f48700(0000) GS:ffff88806ce00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fd18abc81a8 CR3: 0000000047870000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 Call Trace: copy_page_from_iter+0xe3/0x180 blk_rq_map_user_iov+0xb41/0x16c0 blk_rq_map_user_io+0x1d1/0x200 sg_common_write.constprop.0+0xd8d/0x15f0 sg_write.part.0+0x698/0xac0 sg_write+0x8d/0xe0 vfs_write+0x2d8/0xdd0 ksys_write+0x12b/0x260 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f5d3c9d2b19 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5d39f48188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f5d3cae5f60 RCX: 00007f5d3c9d2b19 RDX: 0000000000000125 RSI: 00000000200003c0 RDI: 0000000000000005 RBP: 00007f5d3ca2cf6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc3323e94f R14: 00007f5d39f48300 R15: 0000000000022000 irq event stamp: 5499 hardirqs last enabled at (5527): [] __up_console_sem+0x78/0x80 hardirqs last disabled at (5546): [] __up_console_sem+0x5d/0x80 softirqs last enabled at (5286): [] __irq_exit_rcu+0xcc/0x110 softirqs last disabled at (5275): [] __irq_exit_rcu+0xcc/0x110 ---[ end trace 0000000000000000 ]--- audit: type=1326 audit(1679746627.816:23): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=14370 comm="syz-executor.7" exe="/syz-executor.7" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f0ed551db19 code=0x0 syz-executor.5: attempt to access beyond end of device loop5: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop5, logical block 10, lost async page write sg_write: data in/out 917468/251 bytes for SCSI command 0x0-- guessing data in; program syz-executor.4 not setting count and/or reply_len properly audit: type=1326 audit(1679746628.041:24): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=14401 comm="syz-executor.7" exe="/syz-executor.7" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f0ed551db19 code=0x0 loop5: detected capacity change from 0 to 40 audit: type=1326 audit(1679746628.212:25): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=14619 comm="syz-executor.7" exe="/syz-executor.7" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f0ed551db19 code=0x0 syz-executor.5: attempt to access beyond end of device loop5: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop5, logical block 10, lost async page write