================================================================== BUG: KASAN: use-after-free in perf_output_read_group kernel/events/core.c:5882 [inline] BUG: KASAN: use-after-free in perf_output_read+0xe58/0xfc0 kernel/events/core.c:5917 Read of size 8 at addr ffff8881667be888 by task syz-executor.4/25967 CPU: 1 PID: 25967 Comm: syz-executor.4 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 25965: 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 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+0xf1/0x310 mm/slub.c:4288 __kmalloc_reserve.isra.0+0x2d/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+0x85/0x500 net/core/skbuff.c:5208 sock_alloc_send_pskb+0x5a5/0x6f0 net/core/sock.c:2076 __ip_append_data.isra.0+0x122f/0x2040 net/ipv4/ip_output.c:972 ip_make_skb+0x1a0/0x1f0 net/ipv4/ip_output.c:1485 udp_sendmsg+0x155c/0x1b90 net/ipv4/udp.c:1048 udpv6_sendmsg+0x129d/0x24e0 net/ipv6/udp.c:1193 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 Freed by task 25957: 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 __consume_stateless_skb+0x66/0x2c0 net/core/skbuff.c:719 skb_consume_udp+0xfc/0x240 net/ipv4/udp.c:1408 udpv6_recvmsg+0x904/0x1710 net/ipv6/udp.c:468 inet_recvmsg+0x138/0x540 net/ipv4/af_inet.c:791 ___sys_recvmsg+0x234/0x4f0 net/socket.c:2221 __sys_recvmmsg+0x206/0x650 net/socket.c:2329 SYSC_recvmmsg net/socket.c:2405 [inline] SyS_recvmmsg+0x145/0x170 net/socket.c:2394 do_syscall_64+0x19b/0x510 arch/x86/entry/common.c:292 The buggy address belongs to the object at ffff8881667be780 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 264 bytes inside of 512-byte region [ffff8881667be780, ffff8881667be980) The buggy address belongs to the page: page:ffffea000599ef80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 0000000000000000 0000000000000000 00000001000c000c raw: dead000000000100 dead000000000200 ffff8881da802c00 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881667be780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881667be800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881667be880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881667be900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881667be980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================