syzbot


BUG: unable to handle kernel NULL pointer dereference in corrupted

Status: fixed on 2021/06/24 20:09
Reported-by: syzbot+416a511c9ff943512e64@syzkaller.appspotmail.com
Fix commit: 93e4ac2a9979 nfc: fix NULL ptr dereference in llcp_sock_getname() after failed connect
First crash: 1619d, last: 1037d
Fix bisection: fixed by (bisect log) :
commit 93e4ac2a9979a9a4ecc158409ed9c3044dc0ae1f
Author: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Date: Mon May 31 07:21:38 2021 +0000

  nfc: fix NULL ptr dereference in llcp_sock_getname() after failed connect

  
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 BUG: unable to handle kernel NULL pointer dereference in corrupted C 374 9h58m 1206d 0/2 upstream: reported C repro on 2020/12/07 19:36
upstream BUG: unable to handle kernel NULL pointer dereference in corrupted (5) C done error 3 1468d 1475d 0/26 auto-obsoleted due to no activity on 2022/09/14 04:18
upstream BUG: unable to handle kernel NULL pointer dereference in corrupted (4) syz done done 1 1738d 1737d 12/26 fixed on 2019/08/27 17:15
upstream BUG: unable to handle kernel NULL pointer dereference in corrupted (3) C 1 1906d 1906d 11/26 fixed on 2019/03/06 07:43
linux-4.14 BUG: unable to handle kernel NULL pointer dereference in corrupted C inconclusive 3 1386d 1626d 0/1 upstream: reported C repro on 2019/10/14 10:06
upstream BUG: unable to handle kernel NULL pointer dereference in corrupted (2) kernel C 1 2080d 2080d 8/26 fixed on 2018/08/07 13:43
upstream BUG: unable to handle kernel NULL pointer dereference in corrupted net C 5 2119d 2119d 8/26 fixed on 2018/07/09 18:05
Fix bisection attempts (19)
Created Duration User Patch Repo Result
2021/06/24 14:16 3h27m bisect fix linux-4.19.y job log (1)
2021/05/25 11:33 30m bisect fix linux-4.19.y job log (0) log
2021/04/25 11:00 32m bisect fix linux-4.19.y job log (0) log
2021/03/26 04:19 22m bisect fix linux-4.19.y job log (0) log
2021/02/24 03:17 24m bisect fix linux-4.19.y job log (0) log
2021/01/23 23:40 23m bisect fix linux-4.19.y job log (0) log
2020/12/24 21:51 24m bisect fix linux-4.19.y job log (0) log
2020/11/24 21:20 24m bisect fix linux-4.19.y job log (0) log
2020/10/25 19:54 24m bisect fix linux-4.19.y job log (0) log
2020/09/25 19:27 25m bisect fix linux-4.19.y job log (0) log
2020/08/26 18:56 30m bisect fix linux-4.19.y job log (0) log
2020/07/27 18:28 27m bisect fix linux-4.19.y job log (0) log
2020/06/27 18:01 26m bisect fix linux-4.19.y job log (0) log
2020/05/28 13:47 25m bisect fix linux-4.19.y job log (0) log
2020/04/28 12:34 25m bisect fix linux-4.19.y job log (0) log
2020/03/29 12:00 24m bisect fix linux-4.19.y job log (0) log
2020/02/28 11:17 40m bisect fix linux-4.19.y job log (0) log
2020/01/29 08:07 26m bisect fix linux-4.19.y job log (0) log
2019/12/30 07:41 25m bisect fix linux-4.19.y job log (0) log

Sample crash report:
audit: type=1400 audit(1575094123.353:35): avc:  denied  { map } for  pid=7758 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1
audit: type=1400 audit(1575094129.913:36): avc:  denied  { map } for  pid=7770 comm="syz-executor984" path="/root/syz-executor984601583" dev="sda1" ino=16484 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
==================================================================
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
BUG: KASAN: null-ptr-deref in memcpy include/linux/string.h:348 [inline]
BUG: KASAN: null-ptr-deref in llcp_sock_getname+0x358/0x460 net/nfc/llcp_sock.c:531
PGD 9b82f067 
Read of size 1 at addr 0000000000000000 by task syz-executor984/7777
P4D 9b82f067 

PUD 91db6067 
CPU: 1 PID: 7777 Comm: syz-executor984 Not tainted 4.19.86-syzkaller #0
PMD 0 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
Oops: 0000 [#1] PREEMPT SMP KASAN
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x197/0x210 lib/dump_stack.c:118
CPU: 0 PID: 7779 Comm: syz-executor984 Not tainted 4.19.86-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
 kasan_report_error mm/kasan/report.c:352 [inline]
 kasan_report mm/kasan/report.c:412 [inline]
 kasan_report.cold+0x199/0x2ba mm/kasan/report.c:396
RIP: 0010:memcpy_erms+0x6/0x10 arch/x86/lib/memcpy_64.S:55
 check_memory_region_inline mm/kasan/kasan.c:260 [inline]
 check_memory_region+0x123/0x190 mm/kasan/kasan.c:267
Code: 90 90 90 90 eb 1e 0f 1f 00 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 89 d1 <f3> a4 c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 fe
 memcpy+0x24/0x50 mm/kasan/kasan.c:302
RSP: 0018:ffff88807da7fd50 EFLAGS: 00010246
 memcpy include/linux/string.h:348 [inline]
 llcp_sock_getname+0x358/0x460 net/nfc/llcp_sock.c:531
RAX: ffff88807da7fe12 RBX: ffff88807da7fe00 RCX: 0000000000000001
 __sys_getpeername+0x12b/0x290 net/socket.c:1735
RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff88807da7fe12
RBP: ffff88807da7fd70 R08: 1ffff1100fb4ffc2 R09: ffffed100fb4ffc3
R10: ffffed100fb4ffc2 R11: ffff88807da7fe12 R12: 0000000000000001
R13: ffff88807da7fe12 R14: 0000000000000000 R15: ffffffff886589a0
FS:  0000000001c0b880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000000a7f8f000 CR4: 00000000001406f0
 __do_sys_getpeername net/socket.c:1748 [inline]
 __se_sys_getpeername net/socket.c:1745 [inline]
 __x64_sys_getpeername+0x73/0xb0 net/socket.c:1745
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
Call Trace:
RIP: 0033:0x441299
Code: e8 ac e8 ff ff 48 83 c4 18 c3 0f 1f 80 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 0f 83 eb 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00
 memcpy include/linux/string.h:348 [inline]
 llcp_sock_getname+0x358/0x460 net/nfc/llcp_sock.c:531
RSP: 002b:00007fffe852d998 EFLAGS: 00000246 ORIG_RAX: 0000000000000034
 __sys_getpeername+0x12b/0x290 net/socket.c:1735
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441299
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00000000006cb018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000246 R12: 0000000000402010
R13: 00000000004020a0 R14: 0000000000000000 R15: 0000000000000000
==================================================================
 __do_sys_getpeername net/socket.c:1748 [inline]
 __se_sys_getpeername net/socket.c:1745 [inline]
 __x64_sys_getpeername+0x73/0xb0 net/socket.c:1745

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/30 06:12 linux-4.19.y 14260788bbb9 3a75be00 .config console log report syz C ci2-linux-4-19
2019/10/31 06:14 linux-4.19.y ef244c308885 a41ca8fa .config console log report syz C ci2-linux-4-19
2019/10/24 20:48 linux-4.19.y c3038e718a19 d01bb02a .config console log report syz C ci2-linux-4-19
2019/10/24 00:25 linux-4.19.y c3038e718a19 b602d64b .config console log report syz C ci2-linux-4-19
2019/10/22 20:05 linux-4.19.y c3038e718a19 4ee855e7 .config console log report syz C ci2-linux-4-19
2019/10/21 14:35 linux-4.19.y c3038e718a19 b24d2b8a .config console log report syz C ci2-linux-4-19
* Struck through repros no longer work on HEAD.