syzbot


BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready

Status: fixed on 2024/03/18 12:46
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+928fd41f9ea0b8e6140e@syzkaller.appspotmail.com
Fix commit: 4588b13abcbd bpf, sockmap: Fix NULL pointer dereference in sk_psock_verdict_data_ready()
First crash: 282d, last: 282d
Fix bisection: fixed by (bisect log) :
commit 4588b13abcbd561ec67f5b3c1cb2eff690990a54
Author: Shigeru Yoshida <syoshida@redhat.com>
Date: Sun Feb 18 15:09:33 2024 +0000

  bpf, sockmap: Fix NULL pointer dereference in sk_psock_verdict_data_ready()

  
Bug presence (1)
Date Name Commit Repro Result
2024/02/14 upstream (ToT) 7e90b5c295ec C [report] BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready net bpf C unreliable 15 265d 385d 25/28 fixed on 2024/04/02 10:57
android-6-1 BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready origin:upstream missing-backport C 204 146d 284d 0/2 auto-obsoleted due to no activity on 2024/09/07 14:49
android-5-15 KASAN: use-after-free Read in sk_psock_verdict_data_ready 10 6h41m 81d 0/2 premoderation: reported on 2024/09/02 22:21
upstream general protection fault in sk_psock_verdict_data_ready net 2 536d 541d 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 13d 9d19h 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 173d 169d 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 97d 97d 0/3 upstream: reported on 2024/08/18 04:55
android-6-1 KASAN: use-after-free Read in sk_psock_verdict_data_ready 2 13d 46d 0/2 premoderation: reported on 2024/10/08 03:06

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 72f73067 P4D 72f73067 PUD 23248067 PMD 0 
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 4454 Comm: syz-executor990 Not tainted 6.1.77-syzkaller #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:ffffc9000402f928 EFLAGS: 00010246
RAX: 1ffff1100f652a5c RBX: ffff88807b2952e0 RCX: ffff888074ca3b80
RDX: 0000000000000000 RSI: ffff88807b295000 RDI: ffff88801f1ef000
RBP: ffffc9000402fb30 R08: ffffffff8896bb3e R09: fffffbfff2092245
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 0000000000000004 R14: ffffffff8896ba1d R15: ffff88801f1ef000
FS:  00007f36f643b6c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000183a4000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 sk_psock_verdict_data_ready+0x210/0x330 net/core/skmsg.c:1221
 unix_stream_sendmsg+0x8fd/0x1070 net/unix/af_unix.c:2241
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg net/socket.c:730 [inline]
 ____sys_sendmsg+0x5a5/0x8f0 net/socket.c:2514
 ___sys_sendmsg net/socket.c:2568 [inline]
 __sys_sendmsg+0x2a9/0x390 net/socket.c:2597
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f36f64bc729
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:00007f36f643b218 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f36f6546368 RCX: 00007f36f64bc729
RDX: 0000000000040000 RSI: 0000000020000980 RDI: 0000000000000003
RBP: 00007f36f6546360 R08: 00007ffd47365c37 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f36f654636c
R13: 00007f36f6513074 R14: 656c6c616b7a7973 R15: 00007ffd47365c38
 </TASK>
Modules linked in:
CR2: 0000000000000000
---[ end trace 0000000000000000 ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at 0xffffffffffffffd6.
RSP: 0018:ffffc9000402f928 EFLAGS: 00010246
RAX: 1ffff1100f652a5c RBX: ffff88807b2952e0 RCX: ffff888074ca3b80
RDX: 0000000000000000 RSI: ffff88807b295000 RDI: ffff88801f1ef000
RBP: ffffc9000402fb30 R08: ffffffff8896bb3e R09: fffffbfff2092245
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 0000000000000004 R14: ffffffff8896ba1d R15: ffff88801f1ef000
FS:  00007f36f643b6c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000183a4000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/14 14:05 linux-6.1.y f1bb70486c9c d902085f .config console log report syz C ci2-linux-6-1-kasan-perf BUG: unable to handle kernel NULL pointer dereference in sk_psock_verdict_data_ready
* Struck through repros no longer work on HEAD.