================================================================== BUG: KASAN: slab-out-of-bounds in _copy_to_iter+0x493/0x1420 Read of size 4076 at addr ffff888046892014 by task syz-executor.5/5288 CPU: 1 PID: 5288 Comm: syz-executor.5 Not tainted 5.19.0-rc6-next-20220715 #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/0x5e5 kasan_report+0xb1/0x1c0 kasan_check_range+0x35/0x1c0 memcpy+0x20/0x60 _copy_to_iter+0x493/0x1420 proc_sys_call_handler+0x43b/0x690 generic_file_splice_read+0x187/0x4d0 do_splice_to+0x1bc/0x240 splice_direct_to_actor+0x2ac/0x8c0 do_splice_direct+0x1b8/0x290 do_sendfile+0xb1d/0x1280 __x64_sys_sendfile64+0x1d1/0x210 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f6ac606cb19 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:00007f6ac35e2188 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f6ac617ff60 RCX: 00007f6ac606cb19 RDX: 0000000000000000 RSI: 0000000000000007 RDI: 0000000000000007 RBP: 00007f6ac60c6f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000205 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe97b79e5f R14: 00007f6ac35e2300 R15: 0000000000022000 Allocated by task 5288: kasan_save_stack+0x1e/0x40 __kasan_kmalloc+0x81/0xa0 kvmalloc_node+0x41/0x1e0 proc_sys_call_handler+0x36e/0x690 generic_file_splice_read+0x187/0x4d0 do_splice_to+0x1bc/0x240 splice_direct_to_actor+0x2ac/0x8c0 do_splice_direct+0x1b8/0x290 do_sendfile+0xb1d/0x1280 __x64_sys_sendfile64+0x1d1/0x210 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888046892000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 20 bytes inside of 1024-byte region [ffff888046892000, ffff888046892400) The buggy address belongs to the physical page: page:00000000406488b5 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x46890 head:00000000406488b5 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x100000000010200(slab|head|node=0|zone=1) raw: 0100000000010200 0000000000000000 dead000000000001 ffff888007841dc0 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888046892100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888046892180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888046892200: 06 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888046892280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888046892300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== loop7: detected capacity change from 0 to 40 audit: type=1400 audit(1658151756.468:10): avc: denied { create } for pid=5291 comm="syz-executor.7" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=dccp_socket permissive=1 ------------[ cut here ]------------ WARNING: CPU: 1 PID: 5288 at lib/iov_iter.c:1026 iov_iter_pipe+0x240/0x2b0 Modules linked in: CPU: 1 PID: 5288 Comm: syz-executor.5 Tainted: G B 5.19.0-rc6-next-20220715 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RIP: 0010:iov_iter_pipe+0x240/0x2b0 Code: d0 7c 04 84 d2 75 34 44 89 63 24 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f e9 2c 80 38 02 e8 a7 e4 3d ff 0f 0b e8 a0 e4 3d ff <0f> 0b e9 a8 fe ff ff e8 74 86 70 ff e9 17 fe ff ff e8 da 86 70 ff RSP: 0018:ffff88801c3179d8 EFLAGS: 00010216 RAX: 000000000003e60b RBX: ffff88801c317a68 RCX: ffffc90002be9000 RDX: 0000000000040000 RSI: ffffffff8207ba20 RDI: 0000000000000004 RBP: ffff88801877a800 R08: 0000000000000004 R09: 0000000000000010 R10: 0000000000000010 R11: 0000000000000001 R12: 0000000000000010 R13: 0000000000000000 R14: 0000000000000010 R15: 0000000000000010 FS: 00007f6ac35e2700(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fb30281c3a4 CR3: 000000001da7a000 CR4: 0000000000350ee0 Call Trace: generic_file_splice_read+0x95/0x4d0 do_splice_to+0x1bc/0x240 splice_direct_to_actor+0x2ac/0x8c0 do_splice_direct+0x1b8/0x290 do_sendfile+0xb1d/0x1280 __x64_sys_sendfile64+0x1d1/0x210 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f6ac606cb19 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:00007f6ac35e2188 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f6ac617ff60 RCX: 00007f6ac606cb19 RDX: 0000000000000000 RSI: 0000000000000007 RDI: 0000000000000007 RBP: 00007f6ac60c6f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000205 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe97b79e5f R14: 00007f6ac35e2300 R15: 0000000000022000 irq event stamp: 1975 hardirqs last enabled at (1975): [] asm_sysvec_apic_timer_interrupt+0x16/0x20 hardirqs last disabled at (1974): [] __do_softirq+0x6be/0x8d0 softirqs last enabled at (1500): [] __irq_exit_rcu+0x11b/0x180 softirqs last disabled at (1453): [] __irq_exit_rcu+0x11b/0x180 ---[ end trace 0000000000000000 ]--- syz-executor.7: attempt to access beyond end of device loop7: rw=2049, sector=124, nr_sectors = 4 limit=40 Buffer I/O error on dev loop7, logical block 31, lost async page write ------------[ cut here ]------------ WARNING: CPU: 1 PID: 5313 at lib/iov_iter.c:1026 iov_iter_pipe+0x240/0x2b0 Modules linked in: CPU: 1 PID: 5313 Comm: syz-executor.5 Tainted: G B W 5.19.0-rc6-next-20220715 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RIP: 0010:iov_iter_pipe+0x240/0x2b0 Code: d0 7c 04 84 d2 75 34 44 89 63 24 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f e9 2c 80 38 02 e8 a7 e4 3d ff 0f 0b e8 a0 e4 3d ff <0f> 0b e9 a8 fe ff ff e8 74 86 70 ff e9 17 fe ff ff e8 da 86 70 ff RSP: 0018:ffff8880473479d8 EFLAGS: 00010212 RAX: 0000000000000dd4 RBX: ffff888047347a68 RCX: ffffc900039f0000 RDX: 0000000000040000 RSI: ffffffff8207ba20 RDI: 0000000000000004 RBP: ffff888018779000 R08: 0000000000000004 R09: 0000000000000010 R10: 0000000000000010 R11: 0000000000000001 R12: 0000000000000010 R13: 0000000000000000 R14: 0000000000000010 R15: 0000000000000010 FS: 00007f6ac35c1700(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f6ac35c0ff8 CR3: 000000001da7a000 CR4: 0000000000350ee0 Call Trace: generic_file_splice_read+0x95/0x4d0 do_splice_to+0x1bc/0x240 splice_direct_to_actor+0x2ac/0x8c0 do_splice_direct+0x1b8/0x290 do_sendfile+0xb1d/0x1280 __x64_sys_sendfile64+0x1d1/0x210 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f6ac606cb19 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:00007f6ac35c1188 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f6ac6180020 RCX: 00007f6ac606cb19 RDX: 0000000000000000 RSI: 0000000000000007 RDI: 0000000000000007 RBP: 00007f6ac60c6f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000205 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe97b79e5f R14: 00007f6ac35c1300 R15: 0000000000022000 irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x1dba/0x6d60 softirqs last enabled at (0): [] copy_process+0x1dfe/0x6d60 softirqs last disabled at (0): [<0000000000000000>] 0x0 ---[ end trace 0000000000000000 ]---