should_failslab+0x5/0x10 mm/slab_common.c:1588 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc mm/slab.c:3383 [inline] __do_kmalloc mm/slab.c:3725 [inline] __kmalloc_track_caller+0x2a6/0x3c0 mm/slab.c:3742 ================================================================== memdup_user+0x22/0xb0 mm/util.c:160 strndup_user+0x70/0x120 mm/util.c:217 BUG: KASAN: stack-out-of-bounds in deref_stack_regs arch/x86/kernel/unwind_orc.c:349 [inline] BUG: KASAN: stack-out-of-bounds in unwind_next_frame+0x195c/0x1c60 arch/x86/kernel/unwind_orc.c:515 copy_mount_string fs/namespace.c:2703 [inline] ksys_mount+0x34/0x130 fs/namespace.c:3000 Read of size 8 at addr ffff888040aefec8 by task syz-executor.2/27946 __do_sys_mount fs/namespace.c:3029 [inline] __se_sys_mount fs/namespace.c:3026 [inline] __x64_sys_mount+0xba/0x150 fs/namespace.c:3026 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465f69 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f98f1d07188 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465f69 RDX: 0000000020000100 RSI: 0000000020000000 RDI: 0000000000400002 RBP: 00007f98f1d071d0 R08: 0000000020000380 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffdf1012dcf R14: 00007f98f1d07300 R15: 0000000000022000 CPU: 1 PID: 27946 Comm: syz-executor.2 Not tainted 4.19.180-syzkaller #0 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+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 deref_stack_regs arch/x86/kernel/unwind_orc.c:349 [inline] unwind_next_frame+0x195c/0x1c60 arch/x86/kernel/unwind_orc.c:515 perf_callchain_kernel+0x3fa/0x5c0 arch/x86/events/core.c:2346 get_perf_callchain+0x392/0x860 kernel/events/callchain.c:202 perf_callchain+0x165/0x1c0 kernel/events/core.c:6450 perf_prepare_sample+0x81e/0x1620 kernel/events/core.c:6477 __perf_event_output kernel/events/core.c:6592 [inline] perf_event_output_forward+0xf3/0x270 kernel/events/core.c:6610 __perf_event_overflow+0x13c/0x370 kernel/events/core.c:7883 perf_swevent_overflow kernel/events/core.c:7959 [inline] perf_swevent_event+0x347/0x550 kernel/events/core.c:7987 perf_tp_event+0x29f/0xaa0 kernel/events/core.c:8415 perf_trace_run_bpf_submit+0x144/0x220 kernel/events/core.c:8389 perf_trace_sys_exit+0x2dc/0x460 include/trace/events/syscalls.h:44 trace_sys_exit include/trace/events/syscalls.h:44 [inline] syscall_slow_exit_work+0x36c/0x630 arch/x86/entry/common.c:231 syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x523/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465f69 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdb2be9f188 EFLAGS: 00000246 ORIG_RAX: 00000000000000fa RAX: ffffffffffffffea RBX: 000000000056bf60 RCX: 0000000000465f69 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00000000004bfa8f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007fff77f349ff R14: 00007fdb2be9f300 R15: 0000000000022000 The buggy address belongs to the page: page:ffffea000102bbc0 count:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xfff00000000000() raw: 00fff00000000000 0000000000000000 ffffffff01020101 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888040aefd80: 04 f2 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 ffff888040aefe00: 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 00 00 >ffff888040aefe80: 00 00 00 00 00 00 f3 f3 f3 f3 00 00 00 00 00 00 ^ ffff888040aeff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888040aeff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================