================================================================== BUG: KASAN: slab-out-of-bounds in perf_output_read_group kernel/events/core.c:5888 [inline] BUG: KASAN: slab-out-of-bounds in perf_output_read+0xe8d/0xfe0 kernel/events/core.c:5923 Read of size 8 at addr ffff8880890c7dc8 by task syz-executor.1/23904 CPU: 0 PID: 23904 Comm: syz-executor.1 Not tainted 4.14.177-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x13e/0x194 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1e2 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2ae mm/kasan/report.c:393 perf_output_read_group kernel/events/core.c:5888 [inline] perf_output_read+0xe8d/0xfe0 kernel/events/core.c:5923 perf_output_sample+0xb40/0x1700 kernel/events/core.c:5965 __perf_event_output kernel/events/core.c:6275 [inline] perf_event_output_forward+0xf8/0x1f0 kernel/events/core.c:6288 __perf_event_overflow+0x113/0x310 kernel/events/core.c:7526 perf_swevent_overflow+0x17b/0x210 kernel/events/core.c:7602 perf_swevent_event+0x19c/0x270 kernel/events/core.c:7635 do_perf_sw_event kernel/events/core.c:7743 [inline] ___perf_sw_event+0x295/0x470 kernel/events/core.c:7774 __perf_sw_event+0x42/0x80 kernel/events/core.c:7786 perf_sw_event include/linux/perf_event.h:1046 [inline] __do_page_fault+0x5e6/0xb40 arch/x86/mm/fault.c:1483 page_fault+0x25/0x50 arch/x86/entry/entry_64.S:1122 RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:181 RSP: 0018:ffff88808476fa80 EFLAGS: 00010206 RAX: 0000000000000000 RBX: 0000000000008000 RCX: 0000000000002aeb RDX: 0000000000008000 RSI: 0000000020efb000 RDI: ffff88809287d515 RBP: 0000000020ef5aeb R08: ffffed1012510000 R09: 0000000000000000 R10: ffffed101250ffff R11: ffff88809287ffff R12: ffff888092878000 R13: 00007ffffffff000 R14: 0000000020efdaeb R15: ffff888092878000 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_from_user arch/x86/include/asm/uaccess_64.h:55 [inline] copyin+0x99/0xc0 lib/iov_iter.c:146 _copy_from_iter_full+0x189/0x6a0 lib/iov_iter.c:608 copy_from_iter_full include/linux/uio.h:126 [inline] skb_do_copy_data_nocache include/net/sock.h:1886 [inline] skb_copy_to_page_nocache include/net/sock.h:1912 [inline] tcp_sendmsg_locked+0xa91/0x2fd0 net/ipv4/tcp.c:1360 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1457 inet_sendmsg+0x116/0x4d0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xc5/0x100 net/socket.c:656 SYSC_sendto+0x1c4/0x2b0 net/socket.c:1763 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45c829 RSP: 002b:00007f60b73c4c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000500d40 RCX: 000000000045c829 RDX: ffffffffffffffef RSI: 0000000020d7cfcb RDI: 0000000000000005 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000020000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000a08 R14: 00000000004ccbe1 R15: 00007f60b73c56d4 Allocated by task 6366: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15b/0x7c0 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:661 [inline] new_dir fs/proc/proc_sysctl.c:945 [inline] get_subdir fs/proc/proc_sysctl.c:990 [inline] __register_sysctl_table+0x7cc/0xe60 fs/proc/proc_sysctl.c:1333 __devinet_sysctl_register+0x139/0x240 net/ipv4/devinet.c:2313 devinet_sysctl_register net/ipv4/devinet.c:2353 [inline] devinet_sysctl_register+0x11b/0x1f0 net/ipv4/devinet.c:2343 inetdev_init+0x202/0x3d0 net/ipv4/devinet.c:262 inetdev_event+0xcb5/0x1020 net/ipv4/devinet.c:1461 notifier_call_chain+0x107/0x1a0 kernel/notifier.c:93 call_netdevice_notifiers net/core/dev.c:1687 [inline] register_netdevice+0x9e2/0xc70 net/core/dev.c:7692 veth_newlink+0x3ba/0x8a0 drivers/net/veth.c:416 rtnl_newlink+0xecb/0x1720 net/core/rtnetlink.c:2728 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4315 netlink_rcv_skb+0x127/0x370 net/netlink/af_netlink.c:2433 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x437/0x620 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x733/0xbe0 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xc5/0x100 net/socket.c:656 SYSC_sendto+0x1c4/0x2b0 net/socket.c:1763 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8880890c7cc0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 264 bytes inside of 512-byte region [ffff8880890c7cc0, ffff8880890c7ec0) The buggy address belongs to the page: page:ffffea00022431c0 count:1 mapcount:0 mapping:ffff8880890c7040 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff8880890c7040 0000000000000000 0000000100000006 raw: ffffea000228c5a0 ffffea000285a2e0 ffff88812fe54940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880890c7c80: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff8880890c7d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880890c7d80: 00 00 00 00 00 00 00 00 05 fc fc fc fc fc fc fc ^ ffff8880890c7e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880890c7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================