syzbot


general protection fault in llc_ui_sendmsg

Status: internal: reported C repro on 2022/03/24 10:58
Reported-by: syzbot+@syzkaller.appspotmail.com
Fix commit: 2d327a79ee17 llc: only change llc->dev when bind() succeeds
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 96d, last: 92d

Cause bisection: introduced by (bisect log) :
commit 764f4eb6846f5475f1244767d24d25dd86528a4a
Author: Eric Dumazet <edumazet@google.com>
Date: Wed Mar 23 00:41:47 2022 +0000

  llc: fix netdevice reference leaks in llc_ui_bind()

Crash: general protection fault in llc_ui_sendmsg (log)
Repro: C syz .config
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 general protection fault in llc_ui_sendmsg 2 82d 85d 0/1 upstream: reported on 2022/04/05 04:05

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc000000001b: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000000d8-0x00000000000000df]
CPU: 0 PID: 3610 Comm: syz-executor148 Tainted: G        W         5.17.0-syzkaller-04796-g169e77764adc #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:llc_ui_sendmsg+0x1ea/0x10d0 net/llc/af_llc.c:947
Code: 80 3c 02 00 0f 85 50 0d 00 00 4c 8b a5 38 05 00 00 48 b8 00 00 00 00 00 fc ff df 49 8d bc 24 de 00 00 00 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 33
RSP: 0018:ffffc90003a7f8c8 EFLAGS: 00010207
RAX: dffffc0000000000 RBX: ffffc90003a7fd70 RCX: 0000000000000000
RDX: 000000000000001b RSI: ffffffff875d3ec3 RDI: 00000000000000de
RBP: ffff8880123cc000 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff875d3eb5 R11: 0000000000000000 R12: 0000000000000000
R13: ffff8880183eec18 R14: 0000000000000000 R15: 0000000000000000
FS:  00007fb7c3b22700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020006038 CR3: 0000000072da0000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 sock_sendmsg_nosec net/socket.c:705 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:725
 ____sys_sendmsg+0x331/0x810 net/socket.c:2413
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2467
 __sys_sendmmsg+0x195/0x470 net/socket.c:2553
 __do_sys_sendmmsg net/socket.c:2582 [inline]
 __se_sys_sendmmsg net/socket.c:2579 [inline]
 __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2579
 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:0x7fb7c3b91989
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb7c3b22318 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007fb7c3c193f8 RCX: 00007fb7c3b91989
RDX: 03fffffffffffeed RSI: 0000000020001380 RDI: 0000000000000003
RBP: 00007fb7c3c193f0 R08: 00007fb7c3b22700 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb7c3c193fc
R13: 00007ffe7fb8beff R14: 00007fb7c3b22400 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:llc_ui_sendmsg+0x1ea/0x10d0 net/llc/af_llc.c:947
Code: 80 3c 02 00 0f 85 50 0d 00 00 4c 8b a5 38 05 00 00 48 b8 00 00 00 00 00 fc ff df 49 8d bc 24 de 00 00 00 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 33
RSP: 0018:ffffc90003a7f8c8 EFLAGS: 00010207

RAX: dffffc0000000000 RBX: ffffc90003a7fd70 RCX: 0000000000000000
RDX: 000000000000001b RSI: ffffffff875d3ec3 RDI: 00000000000000de
RBP: ffff8880123cc000 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff875d3eb5 R11: 0000000000000000 R12: 0000000000000000
R13: ffff8880183eec18 R14: 0000000000000000 R15: 0000000000000000
FS:  00007fb7c3b22700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6377c60310 CR3: 0000000072da0000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
----------------
Code disassembly (best guess):
   0:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   4:	0f 85 50 0d 00 00    	jne    0xd5a
   a:	4c 8b a5 38 05 00 00 	mov    0x538(%rbp),%r12
  11:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  18:	fc ff df
  1b:	49 8d bc 24 de 00 00 	lea    0xde(%r12),%rdi
  22:	00
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	0f b6 14 02          	movzbl (%rdx,%rax,1),%edx <-- trapping instruction
  2e:	48 89 f8             	mov    %rdi,%rax
  31:	83 e0 07             	and    $0x7,%eax
  34:	83 c0 01             	add    $0x1,%eax
  37:	38 d0                	cmp    %dl,%al
  39:	7c 08                	jl     0x43
  3b:	84 d2                	test   %dl,%dl
  3d:	0f                   	.byte 0xf
  3e:	85 33                	test   %esi,(%rbx)

Crashes (365):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-net-kasan-gce 2022/03/26 06:23 net-next 169e77764adc 89bc8608 .config log report syz C general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/24 11:55 net-next 89695196f0ba 89bc8608 .config log report syz C general protection fault in llc_ui_sendmsg
ci-upstream-kasan-gce-selinux-root 2022/03/28 09:38 upstream f82da161ea75 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-kasan-gce-root 2022/03/27 00:19 upstream bddac7c1e02b 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-kasan-gce-smack-root 2022/03/26 09:37 upstream 52d543b5497c 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-this-kasan-gce 2022/03/26 01:33 net a81687886ca9 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/28 22:27 net-next 169e77764adc ee339263 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/28 20:57 net-next 169e77764adc ee339263 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/28 19:25 net-next 169e77764adc ee339263 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/28 18:00 net-next 169e77764adc ee339263 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/28 16:39 net-next 169e77764adc ee339263 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/28 14:04 net-next 169e77764adc ee339263 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/28 07:59 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/28 06:52 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/28 05:44 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/28 04:40 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/28 03:31 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/28 02:10 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/28 01:02 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 21:16 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 20:06 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 19:25 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 17:12 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 16:00 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 15:54 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 14:51 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 13:30 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 12:17 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 10:27 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 09:22 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 09:19 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 08:05 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 06:52 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 05:35 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 05:33 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 04:30 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 03:16 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 02:04 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/27 01:48 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/26 22:49 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/26 21:45 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/26 21:16 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/26 20:06 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/26 18:16 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/26 17:16 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/26 16:04 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/26 14:54 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/26 13:48 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/26 10:55 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-net-kasan-gce 2022/03/24 10:57 net-next 89695196f0ba 89bc8608 .config log report info general protection fault in llc_ui_sendmsg
ci-upstream-linux-next-kasan-gce-root 2022/03/26 12:12 linux-next fd4fbb998102 89bc8608 .config log report info general protection fault in llc_ui_sendmsg