================================================================== BUG: KASAN: slab-out-of-bounds in predicate_parse kernel/trace/trace_events_filter.c:557 [inline] BUG: KASAN: slab-out-of-bounds in process_preds+0x3ecf/0x4160 kernel/trace/trace_events_filter.c:1509 Write of size 4 at addr ffff8801c5320ff0 by task syz-executor7/14468 CPU: 0 PID: 14468 Comm: syz-executor7 Not tainted 4.17.0+ #7 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_store4_noabort+0x17/0x20 mm/kasan/report.c:437 predicate_parse kernel/trace/trace_events_filter.c:557 [inline] process_preds+0x3ecf/0x4160 kernel/trace/trace_events_filter.c:1509 create_filter+0x167/0x280 kernel/trace/trace_events_filter.c:1717 ftrace_profile_set_filter+0x135/0x2f0 kernel/trace/trace_events_filter.c:2042 perf_event_set_filter+0x251/0x1260 kernel/events/core.c:9078 _perf_ioctl+0x865/0x1600 kernel/events/core.c:5059 perf_ioctl+0x59/0x80 kernel/events/core.c:5110 perf_compat_ioctl+0x6a/0xb0 kernel/events/core.c:5132 __do_compat_sys_ioctl fs/compat_ioctl.c:1459 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:1405 [inline] __ia32_compat_sys_ioctl+0x221/0x640 fs/compat_ioctl.c:1405 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f11cb9 Code: 55 08 8b 88 64 cd ff ff 8b 98 68 cd ff ff 89 c8 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 1c 24 c3 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f5f0d0ac EFLAGS: 00000282 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000013 RCX: 0000000040042406 RDX: 0000000020000080 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 14177: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 __do_kmalloc mm/slab.c:3718 [inline] __kmalloc+0x14e/0x760 mm/slab.c:3727 kmalloc include/linux/slab.h:518 [inline] load_elf_phdrs+0x176/0x260 fs/binfmt_elf.c:441 load_elf_binary+0x9bd/0x5610 fs/binfmt_elf.c:838 search_binary_handler+0x17d/0x570 fs/exec.c:1653 exec_binprm fs/exec.c:1695 [inline] __do_execve_file.isra.35+0x171d/0x2730 fs/exec.c:1819 do_execveat_common fs/exec.c:1866 [inline] do_execve fs/exec.c:1883 [inline] __do_sys_execve fs/exec.c:1964 [inline] __se_sys_execve fs/exec.c:1959 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:1959 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 14177: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x260 mm/slab.c:3813 load_elf_binary+0x255d/0x5610 fs/binfmt_elf.c:1117 search_binary_handler+0x17d/0x570 fs/exec.c:1653 exec_binprm fs/exec.c:1695 [inline] __do_execve_file.isra.35+0x171d/0x2730 fs/exec.c:1819 do_execveat_common fs/exec.c:1866 [inline] do_execve fs/exec.c:1883 [inline] __do_sys_execve fs/exec.c:1964 [inline] __se_sys_execve fs/exec.c:1959 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:1959 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801c5320c80 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 368 bytes to the right of 512-byte region [ffff8801c5320c80, ffff8801c5320e80) The buggy address belongs to the page: page:ffffea000714c800 count:1 mapcount:0 mapping:ffff8801da800940 index:0xffff8801c5320500 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea000740bc48 ffffea00071a40c8 ffff8801da800940 raw: ffff8801c5320500 ffff8801c5320000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c5320e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c5320f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801c5320f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801c5321000: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ffff8801c5321080: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================