================================================================== 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 ffff8881c4c19c88 by task syz-executor.0/1847 CPU: 1 PID: 1847 Comm: syz-executor.0 Not tainted 4.14.124+ #3 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 1849: 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_pipe_info+0xaa/0x380 fs/pipe.c:647 get_pipe_inode fs/pipe.c:726 [inline] create_pipe_files+0xd4/0x8b0 fs/pipe.c:759 __do_pipe_flags+0x30/0x210 fs/pipe.c:816 SYSC_pipe2 fs/pipe.c:864 [inline] SyS_pipe2+0x76/0x150 fs/pipe.c:858 do_syscall_64+0x19b/0x510 arch/x86/entry/common.c:292 Freed by task 1837: 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 put_pipe_info+0xa8/0xc0 fs/pipe.c:575 pipe_release+0x1a6/0x240 fs/pipe.c:596 __fput+0x25e/0x700 fs/file_table.c:210 task_work_run+0x118/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x13b/0x160 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x392/0x510 arch/x86/entry/common.c:297 The buggy address belongs to the object at ffff8881c4c19b80 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 264 bytes inside of 512-byte region [ffff8881c4c19b80, ffff8881c4c19d80) The buggy address belongs to the page: page:ffffea0007130600 count:1 mapcount:0 mapping: (null) index:0xffff8881c4c18c80 compound_mapcount: 0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 0000000000000000 ffff8881c4c18c80 00000001800c0008 raw: ffffea0006157c80 0000000400000004 ffff8881da802c00 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c4c19b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881c4c19c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881c4c19c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881c4c19d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881c4c19d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================