================================================================== BUG: KASAN: slab-out-of-bounds in perf_output_read_group kernel/events/core.c:5882 [inline] BUG: KASAN: slab-out-of-bounds in perf_output_read+0xe58/0xfc0 kernel/events/core.c:5917 Read of size 8 at addr ffff8881a5d0ff08 by task syz-executor.3/3182 CPU: 1 PID: 3182 Comm: syz-executor.3 Not tainted 4.14.128+ #10 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x10e lib/dump_stack.c:53 print_address_description+0x60/0x226 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+0xae/0x2d5 mm/kasan/report.c:393 Allocated by task 3182: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.0+0x4f/0xd0 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x126/0x310 mm/slub.c:2750 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] alloc_perf_context+0x44/0xe0 kernel/events/core.c:3864 find_get_context.isra.0+0x119/0x550 kernel/events/core.c:3953 SYSC_perf_event_open kernel/events/core.c:10160 [inline] SyS_perf_event_open+0x9d3/0x2530 kernel/events/core.c:9988 do_syscall_64+0x19b/0x510 arch/x86/entry/common.c:292 Freed by task 609: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xb0/0x190 mm/kasan/kasan.c:524 slab_free_hook mm/slub.c:1389 [inline] slab_free_freelist_hook mm/slub.c:1410 [inline] slab_free mm/slub.c:2966 [inline] kfree+0xf5/0x310 mm/slub.c:3897 skb_free_head+0x83/0xa0 net/core/skbuff.c:554 skb_release_data+0x4ae/0x730 net/core/skbuff.c:574 skb_release_all+0x46/0x60 net/core/skbuff.c:631 __kfree_skb net/core/skbuff.c:645 [inline] kfree_skb+0xc5/0x350 net/core/skbuff.c:663 __neigh_event_send+0x605/0xd00 net/core/neighbour.c:1053 neigh_event_send include/net/neighbour.h:435 [inline] neigh_resolve_output+0x5a1/0x750 net/core/neighbour.c:1346 neigh_output include/net/neighbour.h:500 [inline] ip6_finish_output2+0x1018/0x1fa0 net/ipv6/ip6_output.c:120 ip6_finish_output+0x63a/0xb30 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip6_output+0x1dc/0x680 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:459 [inline] ip6_local_out+0x98/0x170 net/ipv6/output_core.c:178 ip6_send_skb+0x9b/0x2f0 net/ipv6/ip6_output.c:1688 udp_v6_send_skb+0x4e2/0xe80 net/ipv6/udp.c:1081 udpv6_sendmsg+0x1de1/0x24e0 net/ipv6/udp.c:1353 inet_sendmsg+0x14a/0x510 net/ipv4/af_inet.c:760 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb7/0x100 net/socket.c:656 ___sys_sendmsg+0x368/0x890 net/socket.c:2062 __sys_sendmmsg+0x13c/0x360 net/socket.c:2152 SYSC_sendmmsg net/socket.c:2183 [inline] SyS_sendmmsg+0x2f/0x50 net/socket.c:2178 do_syscall_64+0x19b/0x510 arch/x86/entry/common.c:292 The buggy address belongs to the object at ffff8881a5d0fb80 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 392 bytes to the right of 512-byte region [ffff8881a5d0fb80, ffff8881a5d0fd80) The buggy address belongs to the page: page:ffffea0006974380 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 0000000000000000 0000000000000000 00000001000c000c raw: dead000000000100 dead000000000200 ffff8881d6402c00 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881a5d0fe00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881a5d0fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881a5d0ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881a5d0ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881a5d10000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================