================================================================== BUG: KASAN: slab-out-of-bounds in perf_callchain_store include/linux/perf_event.h:1147 [inline] BUG: KASAN: slab-out-of-bounds in perf_callchain_user+0xe31/0xfe0 arch/x86/events/core.c:2485 Write of size 8 at addr ffff8801ba455b00 by task udevd/2377 CPU: 0 PID: 2377 Comm: udevd Not tainted 4.16.0+ #3 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b9/0x29f lib/dump_stack.c:53 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0xac/0x2f5 mm/kasan/report.c:412 __asan_report_store8_noabort+0x17/0x20 mm/kasan/report.c:438 perf_callchain_store include/linux/perf_event.h:1147 [inline] perf_callchain_user+0xe31/0xfe0 arch/x86/events/core.c:2485 get_perf_callchain+0x798/0xb20 kernel/events/callchain.c:227 perf_callchain kernel/events/core.c:6354 [inline] perf_prepare_sample+0x123d/0x1900 kernel/events/core.c:6380 __perf_event_output kernel/events/core.c:6494 [inline] perf_event_output_forward+0x10a/0x2b0 kernel/events/core.c:6512 __perf_event_overflow+0x231/0x4b0 kernel/events/core.c:7748 perf_swevent_overflow+0xad/0x150 kernel/events/core.c:7824 perf_swevent_event+0x1f0/0x2e0 kernel/events/core.c:7857 perf_tp_event+0x4da/0xc30 kernel/events/core.c:8280 perf_trace_run_bpf_submit+0x23f/0x370 kernel/events/core.c:8254 perf_trace_lock_acquire+0x4f1/0x980 include/trace/events/lock.h:13 trace_lock_acquire include/trace/events/lock.h:13 [inline] lock_acquire+0x38e/0x520 kernel/locking/lockdep.c:3919 finish_lock_switch kernel/sched/core.c:2602 [inline] finish_task_switch+0x1c2/0x820 kernel/sched/core.c:2701 context_switch kernel/sched/core.c:2851 [inline] __schedule+0x80f/0x1e40 kernel/sched/core.c:3490 schedule+0xef/0x430 kernel/sched/core.c:3549 schedule_hrtimeout_range_clock+0x3c0/0x470 kernel/time/hrtimer.c:1883 schedule_hrtimeout_range+0x2a/0x40 kernel/time/hrtimer.c:1940 ep_poll+0xf2e/0x11d0 fs/eventpoll.c:1812 do_epoll_wait+0x1b0/0x200 fs/eventpoll.c:2191 SYSC_epoll_wait fs/eventpoll.c:2201 [inline] SyS_epoll_wait+0x2c/0x40 fs/eventpoll.c:2198 do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x7f787363b943 RSP: 002b:00007ffdbc5a2f58 EFLAGS: 00000246 ORIG_RAX: 00000000000000e8 RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 00007f787363b943 RDX: 0000000000000008 RSI: 00007ffdbc5a3050 RDI: 000000000000000a RBP: 0000000001165fc0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000000003 R13: 0000000000000000 R14: 00000000011747b0 R15: 0000000001162250 Allocated by task 6756: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:552 __do_kmalloc_node mm/slab.c:3670 [inline] __kmalloc_node+0x47/0x70 mm/slab.c:3677 kmalloc_node include/linux/slab.h:554 [inline] alloc_callchain_buffers kernel/events/callchain.c:91 [inline] get_callchain_buffers+0x31a/0x4b0 kernel/events/callchain.c:138 perf_event_alloc.part.91+0x2274/0x30a0 kernel/events/core.c:10047 perf_event_alloc kernel/events/core.c:10376 [inline] SYSC_perf_event_open+0xa8a/0x2fa0 kernel/events/core.c:10477 SyS_perf_event_open+0x35/0x40 kernel/events/core.c:10366 do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 4988: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527 __cache_free mm/slab.c:3486 [inline] kfree+0xd9/0x260 mm/slab.c:3801 ceph_destroy_options+0xcc/0x110 net/ceph/ceph_common.c:288 ceph_parse_options+0xe7f/0x1220 net/ceph/ceph_common.c:542 parse_mount_options fs/ceph/super.c:467 [inline] ceph_mount+0x4b1/0x1c63 fs/ceph/super.c:992 mount_fs+0xae/0x328 fs/super.c:1222 vfs_kern_mount.part.34+0xd4/0x4d0 fs/namespace.c:1037 vfs_kern_mount fs/namespace.c:1027 [inline] do_new_mount fs/namespace.c:2517 [inline] do_mount+0x564/0x3070 fs/namespace.c:2847 ksys_mount+0x12d/0x140 fs/namespace.c:3063 SYSC_mount fs/namespace.c:3077 [inline] SyS_mount+0x35/0x50 fs/namespace.c:3074 do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff8801ba454a00 which belongs to the cache kmalloc-8192 of size 8192 The buggy address is located 4352 bytes inside of 8192-byte region [ffff8801ba454a00, ffff8801ba456a00) The buggy address belongs to the page: page:ffffea0006e91500 count:1 mapcount:0 mapping:ffff8801ba454a00 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801ba454a00 0000000000000000 0000000100000001 raw: ffffea000735fd20 ffffea0006ba0f20 ffff8801dac02080 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801ba455a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801ba455a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801ba455b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801ba455b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801ba455c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================