================================================================== BUG: KASAN: vmalloc-out-of-bounds in bpf_jit_binary_free kernel/bpf/core.c:1078 [inline] BUG: KASAN: vmalloc-out-of-bounds in bpf_jit_free+0x26c/0x2b0 kernel/bpf/core.c:1203 Read of size 4 at addr ffffffffa0000000 by task syz-executor.5/8876 CPU: 1 PID: 8876 Comm: syz-executor.5 Not tainted 5.18.0-syzkaller-12160-gd5e9aeda8161 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0xf/0x495 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 bpf_jit_binary_free kernel/bpf/core.c:1078 [inline] bpf_jit_free+0x26c/0x2b0 kernel/bpf/core.c:1203 jit_subprogs kernel/bpf/verifier.c:13683 [inline] fixup_call_args kernel/bpf/verifier.c:13712 [inline] bpf_check+0x6d3e/0xb690 kernel/bpf/verifier.c:15063 bpf_prog_load+0xfb2/0x2250 kernel/bpf/syscall.c:2575 __sys_bpf+0x11a1/0x5700 kernel/bpf/syscall.c:4918 __do_sys_bpf kernel/bpf/syscall.c:5022 [inline] __se_sys_bpf kernel/bpf/syscall.c:5020 [inline] __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:5020 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7f0609c89109 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f060ae00168 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f0609d9bf60 RCX: 00007f0609c89109 RDX: 0000000000000070 RSI: 0000000020000440 RDI: 0000000000000005 RBP: 00007f060ae001d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffc9d973f9f R14: 00007f060ae00300 R15: 0000000000022000 Memory state around the buggy address: BUG: unable to handle page fault for address: fffffbfff3ffffe0 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 23ffe4067 P4D 23ffe4067 PUD 23ffe3067 PMD 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 8876 Comm: syz-executor.5 Not tainted 5.18.0-syzkaller-12160-gd5e9aeda8161 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:memcpy_erms+0x6/0x10 arch/x86/lib/memcpy_64.S:55 Code: cc cc cc cc eb 1e 0f 1f 00 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 89 d1 a4 c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 fe RSP: 0018:ffffc90006f677b8 EFLAGS: 00010082 RAX: ffffc90006f677c4 RBX: ffffffff9fffff00 RCX: 0000000000000010 RDX: 0000000000000010 RSI: fffffbfff3ffffe0 RDI: ffffc90006f677c4 RBP: ffffffffa0000000 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000014 R11: 0000000000000001 R12: 00000000fffffffe R13: ffffffff9fffff80 R14: ffff888074ad8000 R15: 0000000000000282 FS: 00007f060ae00700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: fffffbfff3ffffe0 CR3: 0000000079fc4000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: print_memory_metadata+0x5a/0xdf mm/kasan/report.c:404 print_report mm/kasan/report.c:430 [inline] kasan_report.cold+0xfe/0x1c6 mm/kasan/report.c:491 bpf_jit_binary_free kernel/bpf/core.c:1078 [inline] bpf_jit_free+0x26c/0x2b0 kernel/bpf/core.c:1203 jit_subprogs kernel/bpf/verifier.c:13683 [inline] fixup_call_args kernel/bpf/verifier.c:13712 [inline] bpf_check+0x6d3e/0xb690 kernel/bpf/verifier.c:15063 bpf_prog_load+0xfb2/0x2250 kernel/bpf/syscall.c:2575 __sys_bpf+0x11a1/0x5700 kernel/bpf/syscall.c:4918 __do_sys_bpf kernel/bpf/syscall.c:5022 [inline] __se_sys_bpf kernel/bpf/syscall.c:5020 [inline] __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:5020 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7f0609c89109 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f060ae00168 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f0609d9bf60 RCX: 00007f0609c89109 RDX: 0000000000000070 RSI: 0000000020000440 RDI: 0000000000000005 RBP: 00007f060ae001d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffc9d973f9f R14: 00007f060ae00300 R15: 0000000000022000 Modules linked in: CR2: fffffbfff3ffffe0 ---[ end trace 0000000000000000 ]--- RIP: 0010:memcpy_erms+0x6/0x10 arch/x86/lib/memcpy_64.S:55 Code: cc cc cc cc eb 1e 0f 1f 00 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 89 d1 a4 c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 fe RSP: 0018:ffffc90006f677b8 EFLAGS: 00010082 RAX: ffffc90006f677c4 RBX: ffffffff9fffff00 RCX: 0000000000000010 RDX: 0000000000000010 RSI: fffffbfff3ffffe0 RDI: ffffc90006f677c4 RBP: ffffffffa0000000 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000014 R11: 0000000000000001 R12: 00000000fffffffe R13: ffffffff9fffff80 R14: ffff888074ad8000 R15: 0000000000000282 FS: 00007f060ae00700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: fffffbfff3ffffe0 CR3: 0000000079fc4000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: cc int3 1: cc int3 2: cc int3 3: cc int3 4: eb 1e jmp 0x24 6: 0f 1f 00 nopl (%rax) 9: 48 89 f8 mov %rdi,%rax c: 48 89 d1 mov %rdx,%rcx f: 48 c1 e9 03 shr $0x3,%rcx 13: 83 e2 07 and $0x7,%edx 16: f3 48 a5 rep movsq %ds:(%rsi),%es:(%rdi) 19: 89 d1 mov %edx,%ecx 1b: f3 a4 rep movsb %ds:(%rsi),%es:(%rdi) 1d: c3 retq 1e: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 24: 48 89 f8 mov %rdi,%rax 27: 48 89 d1 mov %rdx,%rcx * 2a: f3 a4 rep movsb %ds:(%rsi),%es:(%rdi) <-- trapping instruction 2c: c3 retq 2d: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 34: 48 89 f8 mov %rdi,%rax 37: 48 83 fa 20 cmp $0x20,%rdx 3b: 72 7e jb 0xbb 3d: 40 38 fe cmp %dil,%sil