syzbot


BUG: unable to handle kernel NULL pointer dereference in x25_connect

Status: fixed on 2020/02/18 14:31
Subsystems: x25
[Documentation on labels]
Reported-by: syzbot+eec0c87f31a7c3b66f7b@syzkaller.appspotmail.com
Fix commit: e21dba7a4df4 net/x25: fix nonblocking connect
First crash: 1600d, last: 1600d
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 4.19 00/92] 4.19.100-stable review 98 (98) 2020/01/31 13:57
[PATCH 4.9 000/271] 4.9.212-stable review 283 (283) 2020/01/29 22:35
[PATCH 5.4 000/104] 5.4.16-stable review 113 (113) 2020/01/29 15:36
[PATCH 4.14 00/46] 4.14.169-stable review 51 (51) 2020/01/29 14:42
[PATCH 4.4 000/183] 4.4.212-stable review 190 (190) 2020/01/29 13:12
[PATCH] net/x25: fix nonblocking connect 2 (2) 2020/01/10 02:40
[PATCH 1/4] [net-next] wan: remove stale Kconfig entries 12 (12) 2019/12/11 13:34
BUG: unable to handle kernel NULL pointer dereference in x25_connect 0 (1) 2019/12/07 07:15

Sample crash report:
BUG: kernel NULL pointer dereference, address: 00000000000000c8
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 97b39067 P4D 97b39067 PUD a2fba067 PMD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 28617 Comm: syz-executor.4 Not tainted 5.4.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:arch_atomic_fetch_sub arch/x86/include/asm/atomic.h:189 [inline]
RIP: 0010:atomic_fetch_sub include/asm-generic/atomic-instrumented.h:200 [inline]
RIP: 0010:refcount_sub_and_test include/linux/refcount.h:253 [inline]
RIP: 0010:refcount_dec_and_test include/linux/refcount.h:281 [inline]
RIP: 0010:x25_neigh_put include/net/x25.h:252 [inline]
RIP: 0010:x25_connect+0x974/0x1020 net/x25/af_x25.c:820
Code: 3c 02 00 0f 85 e4 05 00 00 4d 8b b4 24 98 04 00 00 be 04 00 00 00 bb ff ff ff ff 4d 8d be c8 00 00 00 4c 89 ff e8 6c e4 ca fa <f0> 41 0f c1 9e c8 00 00 00 bf 01 00 00 00 89 de e8 97 a0 8d fa 83
RSP: 0018:ffffc90001927c78 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 00000000ffffffff RCX: ffffffff86e75b54
RDX: 0000000000000001 RSI: 0000000000000004 RDI: 00000000000000c8
RBP: ffffc90001927d90 R08: 1ffffffff1476954 R09: fffffbfff1476955
R10: fffffbfff1476954 R11: ffffffff8a3b4aa3 R12: ffff888063f60000
R13: 00000000fffffe00 R14: 0000000000000000 R15: 00000000000000c8
FS:  00007f117ef4c700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000000000c8 CR3: 0000000064f3b000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __sys_connect_file+0x25d/0x2e0 net/socket.c:1848
 __sys_connect+0x51/0x90 net/socket.c:1861
 __do_sys_connect net/socket.c:1872 [inline]
 __se_sys_connect net/socket.c:1869 [inline]
 __x64_sys_connect+0x73/0xb0 net/socket.c:1869
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45a679
Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f117ef4bc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a679
RDX: 0000000000000012 RSI: 0000000020000080 RDI: 0000000000000004
RBP: 000000000075c118 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f117ef4c6d4
R13: 00000000004c0f1c R14: 00000000004d4c48 R15: 00000000ffffffff
Modules linked in:
CR2: 00000000000000c8
---[ end trace 20e51d278d7d0fc8 ]---
RIP: 0010:arch_atomic_fetch_sub arch/x86/include/asm/atomic.h:189 [inline]
RIP: 0010:atomic_fetch_sub include/asm-generic/atomic-instrumented.h:200 [inline]
RIP: 0010:refcount_sub_and_test include/linux/refcount.h:253 [inline]
RIP: 0010:refcount_dec_and_test include/linux/refcount.h:281 [inline]
RIP: 0010:x25_neigh_put include/net/x25.h:252 [inline]
RIP: 0010:x25_connect+0x974/0x1020 net/x25/af_x25.c:820
Code: 3c 02 00 0f 85 e4 05 00 00 4d 8b b4 24 98 04 00 00 be 04 00 00 00 bb ff ff ff ff 4d 8d be c8 00 00 00 4c 89 ff e8 6c e4 ca fa <f0> 41 0f c1 9e c8 00 00 00 bf 01 00 00 00 89 de e8 97 a0 8d fa 83
RSP: 0018:ffffc90001927c78 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 00000000ffffffff RCX: ffffffff86e75b54
RDX: 0000000000000001 RSI: 0000000000000004 RDI: 00000000000000c8
RBP: ffffc90001927d90 R08: 1ffffffff1476954 R09: fffffbfff1476955
R10: fffffbfff1476954 R11: ffffffff8a3b4aa3 R12: ffff888063f60000
R13: 00000000fffffe00 R14: 0000000000000000 R15: 00000000000000c8
FS:  00007f117ef4c700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000000000c8 CR3: 0000000064f3b000 CR4: 00000000001406e0
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
2019/12/06 11:13 net-old a350d2e7adbb 98b4ef2d .config console log report ci-upstream-net-this-kasan-gce
* Struck through repros no longer work on HEAD.