loop1: detected capacity change from 0 to 192 ================================================================== BUG: KASAN: stack-out-of-bounds in _copy_to_iter+0x48f/0x1420 Read of size 4094 at addr ffff88804534fb12 by task syz-executor.0/3961 CPU: 1 PID: 3961 Comm: syz-executor.0 Not tainted 5.19.0-rc6-next-20220712 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x8b/0xb3 print_report.cold+0x5e/0x5e1 kasan_report+0xb1/0x1b0 kasan_check_range+0x35/0x1b0 memcpy+0x20/0x60 _copy_to_iter+0x48f/0x1420 tty_read+0x29a/0x5d0 generic_file_splice_read+0x187/0x4d0 do_splice_to+0x1bc/0x240 splice_file_to_pipe+0x100/0x120 do_sendfile+0x42a/0x1270 __x64_sys_sendfile64+0x1cd/0x210 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7f4702903b19 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:00007f46ffe79188 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f4702a16f60 RCX: 00007f4702903b19 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004 RBP: 00007f470295df6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff22d8a3af R14: 00007f46ffe79300 R15: 0000000000022000 The buggy address belongs to stack of task syz-executor.0/3961 and is located at offset 66 in frame: tty_read+0x0/0x5d0 This frame has 2 objects: [32, 40) 'cookie' [64, 128) 'kernel_buf' The buggy address belongs to the physical page: page:00000000125202f2 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4534f flags: 0x100000000000000(node=0|zone=1) raw: 0100000000000000 ffffea000114d3c8 ffffea000114d3c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804534fa00: 00 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 ffff88804534fa80: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f2 >ffff88804534fb00: f2 f2 00 00 00 00 00 00 00 00 f3 f3 f3 f3 00 00 ^ ffff88804534fb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 ffff88804534fc00: f1 f1 f1 00 00 00 00 00 f2 f2 f2 f2 f2 00 00 00 ================================================================== loop6: detected capacity change from 0 to 192 audit: type=1326 audit(1657638480.214:9): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=3975 comm="syz-executor.2" exe="/syz-executor.2" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7fed731bfb19 code=0x0 loop1: detected capacity change from 0 to 192 loop6: detected capacity change from 0 to 192 audit: type=1326 audit(1657638480.316:10): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=3975 comm="syz-executor.2" exe="/syz-executor.2" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7fed731bfb19 code=0x0 loop6: detected capacity change from 0 to 192 loop4: detected capacity change from 0 to 10 loop6: detected capacity change from 0 to 10 mmap: syz-executor.1 (4029) uses deprecated remap_file_pages() syscall. See Documentation/mm/remap_file_pages.rst. loop4: detected capacity change from 0 to 10 loop6: detected capacity change from 0 to 10 loop4: detected capacity change from 0 to 10 loop6: detected capacity change from 0 to 10 loop4: detected capacity change from 0 to 10 netlink: 20 bytes leftover after parsing attributes in process `syz-executor.1'. random: crng reseeded on system resumption Restarting kernel threads ... done. audit: type=1400 audit(1657638482.091:11): avc: denied { write } for pid=4126 comm="syz-executor.3" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=perf_event permissive=1 random: crng reseeded on system resumption Restarting kernel threads ... done. blktrace: Concurrent blktraces are not allowed on sg0 random: crng reseeded on system resumption Restarting kernel threads ... done. random: crng reseeded on system resumption Restarting kernel threads ... done. syz-executor.0 uses obsolete (PF_INET,SOCK_PACKET) random: crng reseeded on system resumption Restarting kernel threads ... done. blktrace: Concurrent blktraces are not allowed on sg0 random: crng reseeded on system resumption Restarting kernel threads ... done. EXT4-fs: dax option not supported EXT4-fs: dax option not supported netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor.0'. UDC core: USB Raw Gadget: couldn't find an available UDC or it's busy misc raw-gadget: fail, usb_gadget_register_driver returned -16 UDC core: USB Raw Gadget: couldn't find an available UDC or it's busy misc raw-gadget: fail, usb_gadget_register_driver returned -16 netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. sr 1:0:0:0: [sr0] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s sr 1:0:0:0: [sr0] tag#0 Sense Key : Not Ready [current] sr 1:0:0:0: [sr0] tag#0 Add. Sense: Medium not present sr 1:0:0:0: [sr0] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00 I/O error, dev sr0, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 2 sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 0, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 1 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 1, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 2 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 2, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 3 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 3, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 4 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 4, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 5 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 5, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 6 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 6, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 7 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 7, async page read netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. sr 1:0:0:0: [sr0] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s sr 1:0:0:0: [sr0] tag#0 Sense Key : Not Ready [current] sr 1:0:0:0: [sr0] tag#0 Add. Sense: Medium not present sr 1:0:0:0: [sr0] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00 I/O error, dev sr0, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 2 sr 1:0:0:0: [sr0] tag#0 unaligned transfer Buffer I/O error on dev sr0, logical block 0, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer Buffer I/O error on dev sr0, logical block 1, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer syz-executor.3 (4455) used greatest stack depth: 24424 bytes left loop6: detected capacity change from 0 to 1 sr 1:0:0:0: [sr0] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s sr 1:0:0:0: [sr0] tag#0 Sense Key : Not Ready [current] sr 1:0:0:0: [sr0] tag#0 Add. Sense: Medium not present sr 1:0:0:0: [sr0] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00 sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer loop6: detected capacity change from 0 to 1 loop6: detected capacity change from 0 to 1 loop6: detected capacity change from 0 to 1