================================================================== BUG: KASAN: slab-out-of-bounds in perf_output_read_group kernel/events/core.c:5874 [inline] BUG: KASAN: slab-out-of-bounds in perf_output_read+0xe43/0xfb0 kernel/events/core.c:5909 Read of size 8 at addr ffff88813b7a5e50 by task syz-executor3/15549 CPU: 0 PID: 15549 Comm: syz-executor3 Not tainted 4.14.84+ #13 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x11b lib/dump_stack.c:53 print_address_description+0x60/0x22b mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.6+0x11b/0x2dd mm/kasan/report.c:409 perf_output_read_group kernel/events/core.c:5874 [inline] perf_output_read+0xe43/0xfb0 kernel/events/core.c:5909 perf_output_sample+0x10dd/0x1780 kernel/events/core.c:5951 __perf_event_output kernel/events/core.c:6261 [inline] perf_event_output_forward+0x121/0x230 kernel/events/core.c:6274 __perf_event_overflow+0x116/0x320 kernel/events/core.c:7510 perf_swevent_overflow+0x166/0x1f0 kernel/events/core.c:7586 perf_swevent_event+0x19c/0x270 kernel/events/core.c:7619 do_perf_sw_event kernel/events/core.c:7727 [inline] ___perf_sw_event+0x296/0x480 kernel/events/core.c:7758 __perf_sw_event+0x3f/0x70 kernel/events/core.c:7770 perf_sw_event include/linux/perf_event.h:1041 [inline] __do_page_fault+0x77f/0xb60 arch/x86/mm/fault.c:1466 page_fault+0x22/0x50 arch/x86/entry/entry_64.S:1104 RIP: 0010:copy_user_enhanced_fast_string+0x7/0x10 arch/x86/lib/copy_user_64.S:180 RSP: 0018:ffff888118fe7b48 EFLAGS: 00010206 RAX: 0000000000000000 RBX: 0000000000001000 RCX: 0000000000000500 RDX: 0000000000001000 RSI: ffff88813c09cb00 RDI: 0000000020645000 RBP: 0000000020644500 R08: 0000000000000000 R09: 0000000000000040 R10: ffffed10278139ff R11: ffff88813c09cfff R12: ffff88813c09c000 R13: 00007ffffffff000 R14: 0000000020645500 R15: 0000000000001000 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:112 [inline] copyout+0x99/0xc0 lib/iov_iter.c:137 copy_page_to_iter_iovec lib/iov_iter.c:206 [inline] copy_page_to_iter+0x31d/0xd40 lib/iov_iter.c:710 pipe_to_user+0xa6/0x160 fs/splice.c:1237 splice_from_pipe_feed fs/splice.c:502 [inline] __splice_from_pipe+0x324/0x740 fs/splice.c:626 vmsplice_to_user+0x1bd/0x1e0 fs/splice.c:1272 SYSC_vmsplice fs/splice.c:1353 [inline] SyS_vmsplice+0x12f/0x150 fs/splice.c:1334 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x457569 RSP: 002b:00007f1c0348fc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000116 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000457569 RDX: 0000000000000001 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 000000000072bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f1c034906d4 R13: 00000000004c5717 R14: 00000000004d9778 R15: 00000000ffffffff Allocated by task 26605: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x4f/0xd0 mm/kasan/kasan.c:551 slab_post_alloc_hook mm/slab.h:442 [inline] slab_alloc_node mm/slub.c:2723 [inline] slab_alloc mm/slub.c:2731 [inline] __kmalloc_track_caller+0x104/0x300 mm/slub.c:4288 __kmalloc_reserve.isra.8+0x2f/0xc0 net/core/skbuff.c:137 __alloc_skb+0x105/0x550 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:980 [inline] alloc_skb_with_frags+0xab/0x500 net/core/skbuff.c:5168 sock_alloc_send_pskb+0x55e/0x6e0 net/core/sock.c:2075 __ip_append_data.isra.2+0x11d2/0x2020 net/ipv4/ip_output.c:971 ip_append_data.part.4+0xd8/0x150 net/ipv4/ip_output.c:1173 ip_append_data+0x5a/0x80 net/ipv4/ip_output.c:1162 icmp_push_reply+0x190/0x510 net/ipv4/icmp.c:375 icmp_send+0x9ef/0x12a0 net/ipv4/icmp.c:741 ipv4_link_failure+0x24/0x1b0 net/ipv4/route.c:1196 dst_link_failure include/net/dst.h:442 [inline] vti_xmit net/ipv4/ip_vti.c:238 [inline] vti_tunnel_xmit+0x8ae/0x14f0 net/ipv4/ip_vti.c:273 __netdev_start_xmit include/linux/netdevice.h:4030 [inline] netdev_start_xmit include/linux/netdevice.h:4039 [inline] xmit_one net/core/dev.c:3009 [inline] dev_hard_start_xmit+0x191/0x890 net/core/dev.c:3025 __dev_queue_xmit+0x13d9/0x1f40 net/core/dev.c:3525 neigh_output include/net/neighbour.h:482 [inline] ip_finish_output2+0x972/0x1190 net/ipv4/ip_output.c:229 ip_finish_output+0x3a5/0xc40 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip_output+0x1c9/0x520 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:459 [inline] ip_local_out+0x94/0x170 net/ipv4/ip_output.c:124 ip_send_skb+0x37/0xb0 net/ipv4/ip_output.c:1417 udp_send_skb+0x533/0xb90 net/ipv4/udp.c:829 udp_sendmsg+0x16ce/0x1da0 net/ipv4/udp.c:1053 udpv6_sendmsg+0x125f/0x2510 net/ipv6/udp.c:1193 inet_sendmsg+0x168/0x540 net/ipv4/af_inet.c:781 sock_sendmsg_nosec net/socket.c:645 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:655 ___sys_sendmsg+0x41d/0x890 net/socket.c:2061 __sys_sendmmsg+0x13d/0x360 net/socket.c:2151 SYSC_sendmmsg net/socket.c:2182 [inline] SyS_sendmmsg+0x2f/0x50 net/socket.c:2177 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff88813b7a5b80 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 208 bytes to the right of 512-byte region [ffff88813b7a5b80, ffff88813b7a5d80) The buggy address belongs to the page: page:ffffea0004ede900 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x4000000000008100(slab|head) raw: 4000000000008100 0000000000000000 0000000000000000 00000001000c000c raw: ffffea000733ff80 0000000500000005 ffff8881da802c00 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88813b7a5d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88813b7a5d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88813b7a5e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88813b7a5e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88813b7a5f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================