================================================================== BUG: KASAN: use-after-free in primary_event_id kernel/events/core.c:1316 [inline] BUG: KASAN: use-after-free in perf_output_read_group kernel/events/core.c:5897 [inline] BUG: KASAN: use-after-free in perf_output_read+0x1046/0x1090 kernel/events/core.c:5932 Read of size 8 at addr ffff88809f471220 by task syz-executor117/17064 CPU: 1 PID: 17064 Comm: syz-executor117 Not tainted 4.14.300-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 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:1316 [inline] perf_output_read_group kernel/events/core.c:5897 [inline] perf_output_read+0x1046/0x1090 kernel/events/core.c:5932 perf_output_sample+0xa28/0x16f0 kernel/events/core.c:5974 __perf_event_output kernel/events/core.c:6287 [inline] perf_event_output_forward+0xf8/0x1f0 kernel/events/core.c:6300 __perf_event_overflow+0x113/0x310 kernel/events/core.c:7549 perf_swevent_overflow kernel/events/core.c:7625 [inline] perf_swevent_event+0x299/0x460 kernel/events/core.c:7653 do_perf_sw_event kernel/events/core.c:7766 [inline] ___perf_sw_event+0x2a1/0x480 kernel/events/core.c:7797 __perf_sw_event+0x4f/0x100 kernel/events/core.c:7809 perf_sw_event include/linux/perf_event.h:1046 [inline] __do_page_fault+0x692/0xad0 arch/x86/mm/fault.c:1483 page_fault+0x25/0x50 arch/x86/entry/entry_64.S:1126 Allocated by task 17035: 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 kmem_cache_alloc_node+0x146/0x410 mm/slab.c:3642 __alloc_skb+0x5c/0x510 net/core/skbuff.c:193 alloc_skb_fclone include/linux/skbuff.h:1022 [inline] sk_stream_alloc_skb+0xb1/0x760 net/ipv4/tcp.c:855 tcp_connect+0x1123/0x3f20 net/ipv4/tcp_output.c:3542 tcp_v4_connect+0x129d/0x1a70 net/ipv4/tcp_ipv4.c:255 __inet_stream_connect+0x6ad/0xb90 net/ipv4/af_inet.c:618 tcp_sendmsg_fastopen net/ipv4/tcp.c:1170 [inline] tcp_sendmsg_locked+0x1fac/0x2ef0 net/ipv4/tcp.c:1216 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+0x5e/0xd3 Freed by task 17035: 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] kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758 kfree_skbmem+0x7e/0x100 net/core/skbuff.c:616 tcp_drop net/ipv4/tcp_input.c:4397 [inline] tcp_rcv_state_process+0x342/0x4af0 net/ipv4/tcp_input.c:6208 tcp_v4_do_rcv+0x2c9/0x800 net/ipv4/tcp_ipv4.c:1512 sk_backlog_rcv include/net/sock.h:923 [inline] __release_sock+0x12a/0x350 net/core/sock.c:2284 release_sock+0x54/0x1b0 net/core/sock.c:2822 tcp_sendmsg+0x36/0x40 net/ipv4/tcp.c:1458 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+0x5e/0xd3 The buggy address belongs to the object at ffff88809f471080 which belongs to the cache skbuff_fclone_cache of size 472 The buggy address is located 416 bytes inside of 472-byte region [ffff88809f471080, ffff88809f471258) The buggy address belongs to the page: page:ffffea00027d1c40 count:1 mapcount:0 mapping:ffff88809f471080 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff88809f471080 0000000000000000 0000000100000006 raw: ffffea00027eada0 ffffea00027f4520 ffff88823a8223c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809f471100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809f471180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809f471200: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ^ ffff88809f471280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809f471300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================