================================================================== BUG: KASAN: slab-out-of-bounds in primary_event_id kernel/events/core.c:1315 [inline] BUG: KASAN: slab-out-of-bounds in perf_output_read_group kernel/events/core.c:5893 [inline] BUG: KASAN: slab-out-of-bounds in perf_output_read+0x1046/0x1090 kernel/events/core.c:5928 Read of size 8 at addr ffff88809e972f60 by task syz-executor.4/8315 CPU: 1 PID: 8315 Comm: syz-executor.4 Not tainted 4.14.194-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+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430 primary_event_id kernel/events/core.c:1315 [inline] perf_output_read_group kernel/events/core.c:5893 [inline] perf_output_read+0x1046/0x1090 kernel/events/core.c:5928 perf_output_sample+0xa28/0x16f0 kernel/events/core.c:5970 __perf_event_output kernel/events/core.c:6283 [inline] perf_event_output_forward+0xf8/0x1f0 kernel/events/core.c:6296 __perf_event_overflow+0x113/0x310 kernel/events/core.c:7541 perf_swevent_overflow kernel/events/core.c:7617 [inline] perf_swevent_event+0x299/0x460 kernel/events/core.c:7645 do_perf_sw_event kernel/events/core.c:7758 [inline] ___perf_sw_event+0x2a1/0x480 kernel/events/core.c:7789 __perf_sw_event+0x4f/0x100 kernel/events/core.c:7801 perf_sw_event include/linux/perf_event.h:1046 [inline] __do_page_fault+0x6c1/0xb50 arch/x86/mm/fault.c:1483 page_fault+0x25/0x50 arch/x86/entry/entry_64.S:1123 RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:181 RSP: 0018:ffff888059cffa78 EFLAGS: 00010206 RAX: ffffed100b8e9000 RBX: 0000000000008000 RCX: 0000000000006acb RDX: 0000000000008000 RSI: 0000000020fd7000 RDI: ffff88805c741535 RBP: 0000000020fd5acb R08: 0000000000000001 R09: ffffed100b8e8fff R10: ffff88805c747fff R11: 0000000000000000 R12: ffff88805c740000 R13: 00007ffffffff000 R14: 0000000020fddacb R15: ffff88805c740000 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+0x195/0x690 lib/iov_iter.c:608 copy_from_iter_full include/linux/uio.h:126 [inline] skb_do_copy_data_nocache include/net/sock.h:1889 [inline] skb_copy_to_page_nocache include/net/sock.h:1915 [inline] tcp_sendmsg_locked+0x23fc/0x2ef0 net/ipv4/tcp.c:1360 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1457 inet_sendmsg+0x11a/0x4e0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 SYSC_sendto net/socket.c:1763 [inline] SyS_sendto+0x1c7/0x2c0 net/socket.c:1731 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45d4d9 RSP: 002b:00007f999cce2c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 000000000002d040 RCX: 000000000045d4d9 RDX: ffffffffffffffef RSI: 0000000020d7cfcb RDI: 0000000000000004 RBP: 000000000118cf98 R08: 0000000000000000 R09: 0000000000000053 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c R13: 00007ffccec17f0f R14: 00007f999cce39c0 R15: 000000000118cf4c Allocated by task 8315: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:661 [inline] rb_alloc+0x7e/0x4a0 kernel/events/ring_buffer.c:750 perf_mmap+0xc13/0x1390 kernel/events/core.c:5478 call_mmap include/linux/fs.h:1783 [inline] mmap_region+0xa1a/0x1220 mm/mmap.c:1717 do_mmap+0x5b3/0xcb0 mm/mmap.c:1495 do_mmap_pgoff include/linux/mm.h:2185 [inline] vm_mmap_pgoff+0x14e/0x1a0 mm/util.c:333 SYSC_mmap_pgoff mm/mmap.c:1545 [inline] SyS_mmap_pgoff+0x249/0x510 mm/mmap.c:1503 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 6388: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 skb_free_head net/core/skbuff.c:554 [inline] skb_release_data+0x5f6/0x820 net/core/skbuff.c:574 skb_release_all net/core/skbuff.c:631 [inline] __kfree_skb net/core/skbuff.c:645 [inline] consume_skb+0xe0/0x380 net/core/skbuff.c:705 netlink_broadcast_filtered+0x2ab/0x9e0 net/netlink/af_netlink.c:1489 kobject_uevent_env+0x851/0xcb0 lib/kobject_uevent.c:495 rx_queue_add_kobject net/core/net-sysfs.c:931 [inline] net_rx_queue_update_kobjects+0xce/0x3e0 net/core/net-sysfs.c:953 register_queue_kobjects net/core/net-sysfs.c:1401 [inline] netdev_register_kobject+0x26b/0x3a0 net/core/net-sysfs.c:1612 register_netdevice+0x955/0xe40 net/core/dev.c:7659 rtnl_newlink+0x14dc/0x1830 net/core/rtnetlink.c:2742 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4316 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2433 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x62e/0xb80 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 SYSC_sendto net/socket.c:1763 [inline] SyS_sendto+0x1c7/0x2c0 net/socket.c:1731 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff88809e972c80 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 224 bytes to the right of 512-byte region [ffff88809e972c80, ffff88809e972e80) The buggy address belongs to the page: page:ffffea00027a5c80 count:1 mapcount:0 mapping:ffff88809e972000 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff88809e972000 0000000000000000 0000000100000006 raw: ffffea00027bae20 ffffea00027b55a0 ffff88812fe52940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809e972e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809e972e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88809e972f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88809e972f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809e973000: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================