syzbot


BUG: unable to handle kernel NULL pointer dereference in llcp_sock_getname

Status: closed as invalid on 2020/09/28 07:57
Subsystems: net nfc
[Documentation on labels]
First crash: 1643d, last: 1469d
Cause bisection: introduced by (bisect log) :
commit a0c2dc1fe63e2869b74c1c7f6a81d1745c8a695d
Author: Eric Dumazet <edumazet@google.com>
Date: Fri Oct 4 18:08:34 2019 +0000

  nfc: fix memory leak in llcp_sock_bind()

Crash: KASAN: null-ptr-deref Read in llcp_sock_getname (log)
Repro: C syz .config
  
Fix bisection: failed (error log, bisect log)
  
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2020/05/17 02:10 0m bisect fix upstream error job log (0)
2020/04/16 17:56 18m bisect fix upstream job log (0) log
2020/03/17 04:18 19m bisect fix upstream job log (0) log
2020/02/12 21:18 20m bisect fix upstream job log (0) log
2020/01/13 20:59 19m bisect fix upstream job log (0) log

Sample crash report:
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD a369f067 P4D a369f067 PUD 87cda067 PMD 0 
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 9399 Comm: syz-executor853 Not tainted 5.4.0-rc6+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:memcpy_erms+0x6/0x10 arch/x86/lib/memcpy_64.S:56
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
RSP: 0018:ffff888094a07d50 EFLAGS: 00010246
RAX: ffff888094a07e12 RBX: ffff888094a07e00 RCX: 0000000000000001
RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff888094a07e12
RBP: ffff888094a07d70 R08: 1ffff11012940fc2 R09: ffffed1012940fc3
R10: ffffed1012940fc2 R11: ffff888094a07e12 R12: 0000000000000001
R13: ffff888094a07e12 R14: 0000000000000000 R15: ffffffff88661e80
FS:  0000000002259880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000000a748e000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 memcpy include/linux/string.h:378 [inline]
 llcp_sock_getname+0x358/0x460 net/nfc/llcp_sock.c:519
 __sys_getpeername+0x12b/0x290 net/socket.c:1900
 __do_sys_getpeername net/socket.c:1913 [inline]
 __se_sys_getpeername net/socket.c:1910 [inline]
 __x64_sys_getpeername+0x73/0xb0 net/socket.c:1910
 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4412b9
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
RSP: 002b:00007ffcbc4c81e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000034
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004412b9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00000000006cb018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000246 R12: 0000000000402030
R13: 00000000004020c0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
CR2: 0000000000000000

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/07 07:36 upstream 4dd58158254c d797d201 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2019/10/28 20:28 upstream 9e5eefba3d09 439d7b14 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2019/10/27 23:14 upstream d6d5df1db6e9 25bb509e .config console log report syz C ci-upstream-kasan-gce-selinux-root
2019/10/26 12:19 upstream 8caacaad78b6 413926c5 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2019/10/25 07:59 upstream 39a38bcba4ab d01bb02a .config console log report syz C ci-upstream-kasan-gce-selinux-root
2019/12/14 12:51 linux-next 32b8acf85223 eef6e580 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/11/23 08:35 linux-next b9d3d0140506 598ca6c8 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/11/10 07:00 linux-next 5591cf003452 dc438b91 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/11/09 13:32 linux-next 5591cf003452 dc438b91 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/11/08 06:55 linux-next c68c5373c504 f39aff9e .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/11/05 23:36 linux-next 51309b9d73f5 0f3ec414 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.