syzbot


BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready

Status: fixed on 2024/04/02 10:57
Subsystems: net bpf
[Documentation on labels]
Reported-by: syzbot+fd7b34375c1c8ce29c93@syzkaller.appspotmail.com
Fix commit: 4cd12c6065df bpf, sockmap: Fix NULL pointer dereference in sk_psock_verdict_data_ready()
First crash: 404d, last: 280d
Cause bisection: introduced by (bisect log) [ignored commit]:
commit 113d0a6b3954b57907d1a6e3209f4174f504e0ae
Author: Johannes Weiner <hannes@cmpxchg.org>
Date: Tue Aug 1 13:18:21 2023 +0000

  MAINTAINERS: Add Peter explicitly to the psi section

Crash: BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready (log)
Repro: syz .config
  
Discussions (4)
Title Replies (including bot) Last reply
[PATCH bpf] bpf, sockmap: Fix NULL pointer dereference in sk_psock_verdict_data_ready() 3 (3) 2024/02/21 16:20
[syzbot] [bpf?] [net?] BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready 0 (5) 2024/02/14 15:44
[syzbot] Monthly bpf report (Feb 2024) 0 (1) 2024/02/08 21:48
[syzbot] Monthly bpf report (Nov 2023) 0 (1) 2023/11/07 04:52
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-6-1 BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready origin:upstream missing-backport C 204 162d 299d 0/2 auto-obsoleted due to no activity on 2024/09/07 14:49
linux-6.1 BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready origin:upstream C done 1 298d 298d 3/3 fixed on 2024/03/18 12:46
android-5-15 KASAN: use-after-free Read in sk_psock_verdict_data_ready 11 10d 96d 0/2 premoderation: reported on 2024/09/02 22:21
upstream general protection fault in sk_psock_verdict_data_ready net 2 551d 556d 0/28 auto-obsoleted due to no activity on 2023/09/14 09:29
upstream KASAN: slab-use-after-free Read in sk_psock_verdict_data_ready (2) bpf net 1 29d 25d 0/28 upstream: reported on 2024/11/13 15:05
upstream KASAN: slab-use-after-free Read in sk_psock_verdict_data_ready bpf net 1 189d 185d 0/28 auto-obsoleted due to no activity on 2024/08/31 11:03
linux-5.15 KASAN: use-after-free Read in sk_psock_verdict_data_ready 1 112d 112d 0/3 auto-obsoleted due to no activity on 2024/11/26 04:55
android-6-1 KASAN: use-after-free Read in sk_psock_verdict_data_ready 2 28d 61d 0/2 premoderation: reported on 2024/10/08 03:06
Last patch testing requests (4)
Created Duration User Patch Repo Result
2024/02/14 15:44 22m syoshida@redhat.com patch bpf OK log
2024/02/14 15:04 26m syoshida@redhat.com patch bpf OK log
2023/11/14 03:28 27m retest repro net-next OK log
2023/11/13 11:16 34m mukattreyee@gmail.com https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2023/12/25 00:10 3h03m bisect fix net-next OK (0) job log log

Sample crash report:
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 8000000023d8f067 P4D 8000000023d8f067 PUD 7af79067 PMD 0 
Oops: 0010 [#1] PREEMPT SMP KASAN PTI
CPU: 1 PID: 5255 Comm: syz-executor278 Not tainted 6.8.0-rc1-syzkaller-00195-g577e4432f3ac #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
RIP: 0010:0x0
Code: Unable to access opcode bytes at 0xffffffffffffffd6.
RSP: 0018:ffffc9000437f8c8 EFLAGS: 00010246
RAX: 1ffff1100482de5c RBX: ffff88802416f2e0 RCX: ffff888023a7bb80
RDX: 0000000000000000 RSI: ffff88802416f000 RDI: ffff888023a96800
RBP: ffffc9000437fad0 R08: ffffffff8957112c R09: 1ffffffff2590c84
R10: dffffc0000000000 R11: 0000000000000000 R12: dffffc0000000000
R13: 0000000000000004 R14: ffffffff89570ff9 R15: ffff888023a96800
FS:  00007f8dfb0eb6c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000023dae000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 sk_psock_verdict_data_ready+0x232/0x340 net/core/skmsg.c:1230
 unix_stream_sendmsg+0x9b4/0x1230 net/unix/af_unix.c:2293
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x221/0x270 net/socket.c:745
 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
 ___sys_sendmsg net/socket.c:2638 [inline]
 __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
 do_syscall_64+0xf9/0x240
 entry_SYSCALL_64_after_hwframe+0x6f/0x77
RIP: 0033:0x7f8dfb16c729
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:00007f8dfb0eb218 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f8dfb1f6368 RCX: 00007f8dfb16c729
RDX: 0000000000040000 RSI: 0000000020000980 RDI: 0000000000000003
RBP: 00007f8dfb1f6360 R08: 00007fff2e940fc7 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8dfb1f636c
R13: 00007f8dfb1c3074 R14: 656c6c616b7a7973 R15: 00007fff2e940fc8
 </TASK>
Modules linked in:
CR2: 0000000000000000
---[ end trace 0000000000000000 ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at 0xffffffffffffffd6.
RSP: 0018:ffffc9000437f8c8 EFLAGS: 00010246
RAX: 1ffff1100482de5c RBX: ffff88802416f2e0 RCX: ffff888023a7bb80
RDX: 0000000000000000 RSI: ffff88802416f000 RDI: ffff888023a96800
RBP: ffffc9000437fad0 R08: ffffffff8957112c R09: 1ffffffff2590c84
R10: dffffc0000000000 R11: 0000000000000000 R12: dffffc0000000000
R13: 0000000000000004 R14: ffffffff89570ff9 R15: ffff888023a96800
FS:  00007f8dfb0eb6c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000023dae000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/13 09:57 bpf 577e4432f3ac 77b23aa1 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
2024/02/15 07:01 net-next d1d77120bc28 d9b1cdd5 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
2024/01/29 23:57 upstream 41bccc98fb79 991a98f4 .config console log report syz [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
2023/10/31 01:19 net-next 55c900477f5b b5729d82 .config console log report syz [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
2024/02/13 04:26 upstream 716f4aaa7b48 77b23aa1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
2024/02/21 16:22 bpf 5c138a8a4abe 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
2024/02/13 04:23 net 5b3fbd61b9d1 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
2024/03/02 21:44 bpf-next 0270d69121ba 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
2024/03/02 19:03 bpf-next 0270d69121ba 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
2024/02/29 15:49 bpf-next b9a62998482f 352ab904 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
2024/02/24 06:49 bpf-next 2ab256e93249 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
2024/02/13 04:12 bpf-next 68bc61c26cac 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
2024/01/24 05:02 net-next 2121c43f88f5 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
2023/11/23 12:44 net-next 7490a42020bb 03e12510 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
2023/10/30 23:05 net-next 55c900477f5b b5729d82 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
* Struck through repros no longer work on HEAD.