[v6.1] BUG: unable to handle kernel NULL pointer dereference in bpf_test_run

1 view
Skip to first unread message

syzbot

unread,
Oct 13, 2023, 12:35:56 AM10/13/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 082280fe94a0 Linux 6.1.57
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15e22a09680000
kernel config: https://syzkaller.appspot.com/x/.config?x=2fcfda4f62e1716c
dashboard link: https://syzkaller.appspot.com/bug?extid=692e0f683c59aa374c37
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15fd4ce5680000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1772c04d680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b1d17c35d3c3/disk-082280fe.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d76e84d70582/vmlinux-082280fe.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0a248a00f358/bzImage-082280fe.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+692e0f...@syzkaller.appspotmail.com

BUG: kernel NULL pointer dereference, address: 0000000000000018
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 1f8ef067 P4D 1f8ef067 PUD 1fdf8067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 3561 Comm: syz-executor357 Not tainted 6.1.57-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
RIP: 0010:0x18
Code: Unable to access opcode bytes at 0xffffffffffffffee.
RSP: 0018:ffffc90003adf970 EFLAGS: 00010046
RAX: 0000000000000000 RBX: ffffc90003adfa60 RCX: ffff888022849dc0
RDX: ffffffffa00008c8 RSI: ffffc90000bbe048 RDI: ffffc90003adfc80
RBP: ffffc90003adf970 R08: ffffffff88bd5577 R09: ffffed10045093b9
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffffc90000bbe030 R14: 0000000000000000 R15: ffffc90003adfc60
FS: 00007f2584e556c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffee CR3: 000000001f74a000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__bpf_prog_run include/linux/filter.h:600 [inline]
bpf_prog_run_xdp include/linux/filter.h:775 [inline]
bpf_test_run+0x3d4/0x8b0 net/bpf/test_run.c:400
bpf_prog_test_run_xdp+0x7a7/0x1130 net/bpf/test_run.c:1389
bpf_prog_test_run+0x32f/0x3a0 kernel/bpf/syscall.c:3633
__sys_bpf+0x3eb/0x6c0 kernel/bpf/syscall.c:4986
__do_sys_bpf kernel/bpf/syscall.c:5072 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5070 [inline]
__x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5070
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f2584e94959
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 18 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f2584e55238 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f2584f1e328 RCX: 00007f2584e94959
RDX: 0000000000000048 RSI: 0000000020001480 RDI: 000000000000000a
RBP: 00007f2584f1e320 R08: 00007f2584e556c0 R09: 00007f2584e556c0
R10: 00007f2584e556c0 R11: 0000000000000246 R12: 00007f2584eeb074
R13: 0000000000000000 R14: 00007ffe6567eed0 R15: 00007ffe6567efb8
</TASK>
Modules linked in:
CR2: 0000000000000018
---[ end trace 0000000000000000 ]---
RIP: 0010:0x18
Code: Unable to access opcode bytes at 0xffffffffffffffee.
RSP: 0018:ffffc90003adf970 EFLAGS: 00010046
RAX: 0000000000000000 RBX: ffffc90003adfa60 RCX: ffff888022849dc0
RDX: ffffffffa00008c8 RSI: ffffc90000bbe048 RDI: ffffc90003adfc80
RBP: ffffc90003adf970 R08: ffffffff88bd5577 R09: ffffed10045093b9
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffffc90000bbe030 R14: 0000000000000000 R15: ffffc90003adfc60
FS: 00007f2584e556c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffee CR3: 000000001f74a000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Oct 17, 2023, 10:40:36 AM10/17/23
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit 4121d4481b72501aa4d22680be4ea1096d69d133
git tree: upstream
Author: Jiri Olsa <jo...@kernel.org>
Date: Wed Dec 14 12:35:42 2022 +0000

bpf: Synchronize dispatcher update with bpf_dispatcher_xdp_func

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=178111bd680000
Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages