================================================================== 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+0xe4e/0xfc0 kernel/events/core.c:5917 Read of size 8 at addr ffff888199b55e60 by task syz-executor.1/20770 CPU: 1 PID: 20770 Comm: syz-executor.1 Not tainted 4.14.129+ #11 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 20770: 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 __kmalloc+0x143/0x340 mm/slub.c:3760 kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:661 [inline] rb_alloc+0x7b/0x490 kernel/events/ring_buffer.c:750 perf_mmap+0xc13/0x1390 kernel/events/core.c:5467 call_mmap include/linux/fs.h:1793 [inline] mmap_region+0x7c9/0xf00 mm/mmap.c:1732 do_mmap+0x548/0xb80 mm/mmap.c:1510 do_mmap_pgoff include/linux/mm.h:2180 [inline] vm_mmap_pgoff+0x177/0x1c0 mm/util.c:333 SYSC_mmap_pgoff mm/mmap.c:1560 [inline] SyS_mmap_pgoff+0xf4/0x1b0 mm/mmap.c:1518 do_syscall_64+0x19b/0x510 arch/x86/entry/common.c:292 Freed by task 19521: 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 load_elf_binary+0x1bf2/0x4530 fs/binfmt_elf.c:1096 search_binary_handler fs/exec.c:1638 [inline] search_binary_handler+0x13f/0x6d0 fs/exec.c:1616 exec_binprm fs/exec.c:1680 [inline] do_execveat_common.isra.0+0xf5f/0x1c30 fs/exec.c:1802 do_execve+0x2c/0x40 fs/exec.c:1847 call_usermodehelper_exec_async+0x28c/0x4c0 kernel/umh.c:100 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:404 The buggy address belongs to the object at ffff888199b55b80 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 224 bytes to the right of 512-byte region [ffff888199b55b80, ffff888199b55d80) The buggy address belongs to the page: page:ffffea000666d500 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 0000000000000000 0000000000000000 00000001000c000c raw: ffffea000721e900 0000000d0000000d ffff8881d6402c00 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888199b55d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888199b55d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888199b55e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888199b55e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888199b55f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================