syzbot


BUG: unable to handle kernel NULL pointer dereference in unix_shutdown

Status: fixed on 2022/01/24 20:33
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+cd7ceee0d3b5892f07af@syzkaller.appspotmail.com
Fix commit: d359902d5c35 af_unix: Fix NULL pointer bug in unix_shutdown
First crash: 981d, last: 975d
Cause bisection: introduced by (bisect log) [no-op commit]:
commit b9fc8b4a591811546fec2dbef7e9f809362100c9
Author: Grant Seltzer <grantseltzer@gmail.com>
Date: Mon Feb 22 19:58:46 2021 +0000

  bpf: Add kernel/modules BTF presence checks to bpftool feature command

Crash: WARNING in kvm_wait (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] BUG: unable to handle kernel NULL pointer dereference in unix_shutdown 1 (2) 2022/01/24 13:00
Re: [syzbot] BUG: unable to handle kernel NULL pointer dereference in unix_shutdown 1 (1) 2021/08/21 19:50

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 6f812067 P4D 6f812067 PUD 6fe2f067 PMD 0 
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 6569 Comm: syz-executor133 Not tainted 5.14.0-rc6-next-20210817-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc90002dcfe38 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffffffff8d27cfa0 RCX: 0000000000000000
RDX: 1ffffffff1a4fa0a RSI: ffffffff87d03085 RDI: ffff888077074d80
RBP: ffff888077074d80 R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff87d03004 R11: 0000000000000001 R12: 0000000000000001
R13: ffff888077075398 R14: ffff888077075b58 R15: ffff888077074e00
FS:  0000000001747300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 000000006f93f000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 unix_shutdown+0x28a/0x5b0 net/unix/af_unix.c:2857
 __sys_shutdown_sock net/socket.c:2242 [inline]
 __sys_shutdown_sock net/socket.c:2236 [inline]
 __sys_shutdown+0xf1/0x1b0 net/socket.c:2254
 __do_sys_shutdown net/socket.c:2262 [inline]
 __se_sys_shutdown net/socket.c:2260 [inline]
 __x64_sys_shutdown+0x50/0x70 net/socket.c:2260
 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+0x44/0xae
RIP: 0033:0x43ee29
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdc0b3c908 EFLAGS: 00000246 ORIG_RAX: 0000000000000030
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ee29
RDX: 00000000004ac018 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000402e10 R08: 0000000000000000 R09: 0000000000400488
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402ea0
R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488
Modules linked in:
CR2: 0000000000000000
---[ end trace f541a02ac6ed69b5 ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc90002dcfe38 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffffffff8d27cfa0 RCX: 0000000000000000
RDX: 1ffffffff1a4fa0a RSI: ffffffff87d03085 RDI: ffff888077074d80
RBP: ffff888077074d80 R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff87d03004 R11: 0000000000000001 R12: 0000000000000001
R13: ffff888077075398 R14: ffff888077075b58 R15: ffff888077074e00
FS:  0000000001747300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 000000006f93f000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	28 c3                	sub    %al,%bl
   2:	e8 2a 14 00 00       	callq  0x1431
   7:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
   e:	00 00 00 
  11:	48 89 f8             	mov    %rdi,%rax
  14:	48 89 f7             	mov    %rsi,%rdi
  17:	48 89 d6             	mov    %rdx,%rsi
  1a:	48 89 ca             	mov    %rcx,%rdx
  1d:	4d 89 c2             	mov    %r8,%r10
  20:	4d 89 c8             	mov    %r9,%r8
  23:	4c 8b 4c 24 08       	mov    0x8(%rsp),%r9
  28:	0f 05                	syscall 
  2a:	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax <-- trapping instruction
  30:	73 01                	jae    0x33
  32:	c3                   	retq   
  33:	48 c7 c1 c0 ff ff ff 	mov    $0xffffffffffffffc0,%rcx
  3a:	f7 d8                	neg    %eax
  3c:	64 89 01             	mov    %eax,%fs:(%rcx)
  3f:	48                   	rex.W

Crashes (413):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/08/17 21:21 linux-next 9803fb968c8c a2fe1cb5 .config console log report syz C ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/24 07:27 linux-next 46debfec12b4 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/24 06:02 linux-next 46debfec12b4 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/24 04:42 linux-next 46debfec12b4 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/24 03:05 linux-next 46debfec12b4 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/24 00:54 linux-next 46debfec12b4 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/24 00:54 linux-next 46debfec12b4 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/23 21:49 linux-next 46debfec12b4 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/23 20:38 linux-next 46debfec12b4 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/23 18:30 linux-next 46debfec12b4 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/23 17:30 linux-next 46debfec12b4 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/23 08:53 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/23 07:11 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/23 04:16 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/23 03:59 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/23 02:34 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/23 00:53 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 23:53 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 21:47 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 21:38 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 20:37 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 17:58 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 16:24 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 14:09 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 12:28 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 11:14 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 10:35 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 08:53 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 07:39 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 06:00 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 04:37 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 03:03 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 01:50 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 01:39 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/22 00:21 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/21 22:37 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/21 20:48 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/21 19:59 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/21 18:12 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/21 16:48 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/21 15:35 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/21 14:31 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/21 11:38 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/21 11:35 linux-next 86ed57fd8c93 b599f2fc .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
2021/08/17 15:17 linux-next 9803fb968c8c a2fe1cb5 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: unable to handle kernel NULL pointer dereference in unix_shutdown
* Struck through repros no longer work on HEAD.