[v6.1] BUG: unable to handle kernel paging request in bpf_dispatcher_xdp

3 views
Skip to first unread message

syzbot

unread,
Apr 2, 2023, 4:52:49 AM4/2/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3b29299e5f60 Linux 6.1.22
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=100b2315c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=4a782518325cb082
dashboard link: https://syzkaller.appspot.com/bug?extid=08ba1e474d350b613604
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/46ca0111f0f2/disk-3b29299e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e685b23e427f/vmlinux-3b29299e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/eb1a012e2c1f/bzImage-3b29299e.xz

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

BUG: unable to handle page fault for address: ffffffff88835d73
#PF: supervisor write access in kernel mode
#PF: error_code(0x0003) - permissions violation
PGD cc8f067 P4D cc8f067 PUD cc90063 PMD 88001e1
Oops: 0003 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 27178 Comm: syz-executor.0 Not tainted 6.1.22-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
RIP: 0010:bpf_dispatcher_xdp+0x9/0x1000
Code: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 48 81 fa 50 49 00 a0 0f 84 <83> 10 00 00 ff e2 a0 7f 1e 48 81 fa 50 49 00 a0 0f 84 71 10 00 00
RSP: 0018:ffffc9000507f978 EFLAGS: 00010283
RAX: ffffffff88835d73 RBX: ffffc9000507fa60 RCX: 0000000000040000
RDX: ffffffffa0004950 RSI: ffffc900050e7048 RDI: ffffc9000507fc80
RBP: ffffc9000507fb70 R08: ffffffff88b92d07 R09: ffffed100b838af9
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffffc900050e7030 R14: 0000000000000000 R15: ffffc9000507fc60
FS: 00007f958f045700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffff88835d73 CR3: 0000000048b73000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
bpf_prog_test_run_xdp+0x7a7/0x1130 net/bpf/test_run.c:1389
bpf_prog_test_run+0x32f/0x3a0 kernel/bpf/syscall.c:3628
__sys_bpf+0x3eb/0x6c0 kernel/bpf/syscall.c:4981
__do_sys_bpf kernel/bpf/syscall.c:5067 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5065 [inline]
__x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5065
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:0x7f958e28c0f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f958f045168 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f958e3abf80 RCX: 00007f958e28c0f9
RDX: 0000000000000048 RSI: 0000000020000200 RDI: 000000000000000a
RBP: 00007f958e2e7b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc2618761f R14: 00007f958f045300 R15: 0000000000022000
</TASK>
Modules linked in:
CR2: ffffffff88835d73
---[ end trace 0000000000000000 ]---
RIP: 0010:bpf_dispatcher_xdp+0x9/0x1000
Code: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 48 81 fa 50 49 00 a0 0f 84 <83> 10 00 00 ff e2 a0 7f 1e 48 81 fa 50 49 00 a0 0f 84 71 10 00 00
RSP: 0018:ffffc9000507f978 EFLAGS: 00010283
RAX: ffffffff88835d73 RBX: ffffc9000507fa60 RCX: 0000000000040000
RDX: ffffffffa0004950 RSI: ffffc900050e7048 RDI: ffffc9000507fc80
RBP: ffffc9000507fb70 R08: ffffffff88b92d07 R09: ffffed100b838af9
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffffc900050e7030 R14: 0000000000000000 R15: ffffc9000507fc60
FS: 00007f958f045700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffff88835d73 CR3: 0000000048b73000 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.

syzbot

unread,
Jul 18, 2023, 10:15:57 PM7/18/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 61fd484b2cf6 Linux 6.1.38
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17fa5a92a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=43a813745c91c8b3
dashboard link: https://syzkaller.appspot.com/bug?extid=08ba1e474d350b613604
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=121644c2a80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17a5a392a80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3915d8466938/disk-61fd484b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/219765b57e6e/vmlinux-61fd484b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6e6a8480f9a2/bzImage-61fd484b.xz

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

BUG: unable to handle page fault for address: ffffffff93284e92
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD cc91067 P4D cc91067 PUD cc92063 PMD 0
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 6265 Comm: syz-executor344 Not tainted 6.1.38-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
RIP: 0010:bpf_dispatcher_xdp+0x863/0x1000
Code: cb 08 00 00 ff e2 90 48 81 fa f4 4d 00 a0 7f 17 48 81 fa f4 4d 00 a0 0f 84 5e 0a 00 00 ff e2 0f 1f 84 00 00 00 00 00 48 81 fa <4c> 4e 00 a0 0f 84 9f 0a 00 00 ff e2 ff e2 0f 1f 84 00 00 00 00 00
RSP: 0018:ffffc90003cff978 EFLAGS: 00010046
RAX: ffffffff8888ca83 RBX: ffffc90003cffa60 RCX: ffff88807af89dc0
RDX: ffffffffa0004c48 RSI: ffffc90003d87048 RDI: ffffc90003cffc80
RBP: ffffc90003cffb70 R08: ffffffff88beb6b7 R09: ffffed100f5f13b9
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffffc90003d87030 R14: 0000000000000000 R15: ffffc90003cffc60
FS: 000055555573f380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffff93284e92 CR3: 00000000276e6000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
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:0x7fdb313ebda9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe609ee968 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fdb313ebda9
RDX: 0000000000000048 RSI: 0000000020000180 RDI: 000000000000000a
RBP: 0000000000000000 R08: 00000000000000a0 R09: 00000000000000a0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
Modules linked in:
CR2: ffffffff93284e92
---[ end trace 0000000000000000 ]---
RIP: 0010:bpf_dispatcher_xdp+0x863/0x1000
Code: cb 08 00 00 ff e2 90 48 81 fa f4 4d 00 a0 7f 17 48 81 fa f4 4d 00 a0 0f 84 5e 0a 00 00 ff e2 0f 1f 84 00 00 00 00 00 48 81 fa <4c> 4e 00 a0 0f 84 9f 0a 00 00 ff e2 ff e2 0f 1f 84 00 00 00 00 00
RSP: 0018:ffffc90003cff978 EFLAGS: 00010046
RAX: ffffffff8888ca83 RBX: ffffc90003cffa60 RCX: ffff88807af89dc0
RDX: ffffffffa0004c48 RSI: ffffc90003d87048 RDI: ffffc90003cffc80
RBP: ffffc90003cffb70 R08: ffffffff88beb6b7 R09: ffffed100f5f13b9
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffffc90003d87030 R14: 0000000000000000 R15: ffffc90003cffc60
FS: 000055555573f380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffff93284e92 CR3: 00000000276e6000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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.

syzbot

unread,
Sep 2, 2023, 7:24:23 PM9/2/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=109fdc48680000
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