syzbot


general protection fault in llc_build_and_send_ui_pkt

Status: fixed on 2023/02/24 13:50
Subsystems: net
[Documentation on labels]
Fix commit: 2d327a79ee17 llc: only change llc->dev when bind() succeeds
First crash: 764d, last: 761d
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_build_and_send_ui_pkt (log)
Repro: C syz .config
  

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000070: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000380-0x0000000000000387]
CPU: 0 PID: 4667 Comm: syz-executor370 Not tainted 5.17.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:llc_build_and_send_ui_pkt+0x1b4/0x280 net/llc/llc_output.c:65
Code: 48 c1 ea 03 80 3c 02 00 0f 85 d3 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b 5d 10 48 8d bb 80 03 00 00 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 99 00 00 00 48 8b b3 80 03 00 00 4c 89 ea 48 89
RSP: 0018:ffffc9000407f890 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000070 RSI: ffffffff872b72b7 RDI: 0000000000000380
RBP: ffff888022bcb280 R08: 0000000000000000 R09: 0000000000000002
R10: ffffffff874f9c76 R11: 0000000000000002 R12: ffff88807a3c4400
R13: ffff888146d4d510 R14: 0000000000000005 R15: 0000000000000005
FS:  00007fbf45da8700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fbf45e40bf0 CR3: 00000000798cf000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 llc_ui_sendmsg+0x7be/0x10d0 net/llc/af_llc.c:967
 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:0x7fbf45dff369
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 18 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:00007fbf45da8318 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007fbf45e80488 RCX: 00007fbf45dff369
RDX: 03fffffffffffeed RSI: 0000000020001380 RDI: 0000000000000003
RBP: 00007fbf45e80480 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbf45e8048c
R13: 00007ffdaa49ca3f R14: 00007fbf45da8400 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:llc_build_and_send_ui_pkt+0x1b4/0x280 net/llc/llc_output.c:65
Code: 48 c1 ea 03 80 3c 02 00 0f 85 d3 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b 5d 10 48 8d bb 80 03 00 00 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 99 00 00 00 48 8b b3 80 03 00 00 4c 89 ea 48 89
RSP: 0018:ffffc9000407f890 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000070 RSI: ffffffff872b72b7 RDI: 0000000000000380
RBP: ffff888022bcb280 R08: 0000000000000000 R09: 0000000000000002
R10: ffffffff874f9c76 R11: 0000000000000002 R12: ffff88807a3c4400
R13: ffff888146d4d510 R14: 0000000000000005 R15: 0000000000000005
FS:  00007fbf45da8700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020003038 CR3: 00000000798cf000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	48 c1 ea 03          	shr    $0x3,%rdx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 d3 00 00 00    	jne    0xe1
   e:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  15:	fc ff df
  18:	48 8b 5d 10          	mov    0x10(%rbp),%rbx
  1c:	48 8d bb 80 03 00 00 	lea    0x380(%rbx),%rdi
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	0f 85 99 00 00 00    	jne    0xcd
  34:	48 8b b3 80 03 00 00 	mov    0x380(%rbx),%rsi
  3b:	4c 89 ea             	mov    %r13,%rdx
  3e:	48                   	rex.W
  3f:	89                   	.byte 0x89

Crashes (26):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/03/24 20:29 net-next-old 89695196f0ba 89bc8608 .config console log report syz C ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/28 02:38 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/27 20:02 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/27 16:21 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/27 14:24 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/27 10:21 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/27 07:17 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/27 06:59 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/27 06:15 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/26 22:05 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/26 20:14 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/26 20:12 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/26 16:01 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/26 13:03 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/26 06:28 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/26 04:57 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/26 04:40 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/25 23:07 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/25 23:05 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/25 21:58 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/25 15:06 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/25 06:17 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/25 02:20 net-next-old 169e77764adc 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/24 22:35 net-next-old 89695196f0ba 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/24 20:00 net-next-old 89695196f0ba 89bc8608 .config console log report info ci-upstream-net-kasan-gce general protection fault in llc_build_and_send_ui_pkt
2022/03/25 23:25 linux-next fd4fbb998102 89bc8608 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in llc_build_and_send_ui_pkt
* Struck through repros no longer work on HEAD.