syzbot


general protection fault in nfc_alloc_send_skb

Status: upstream: reported C repro on 2021/12/31 22:21
Reported-by: syzbot+a170280d5dba6f8d637a@syzkaller.appspotmail.com
First crash: 839d, last: 575d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in nfc_alloc_send_skb net nfc C done 2 840d 834d 20/26 fixed on 2022/03/08 16:11
upstream KASAN: slab-use-after-free Read in nfc_alloc_send_skb net nfc C error 3 132d 162d 26/26 fixed on 2024/01/30 15:47

Sample crash report:
llcp: nfc_llcp_send_ui_frame: Could not allocate PDU (error=-512)
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 10193 Comm: syz-executor388 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2022
RIP: 0010:nfc_alloc_send_skb+0x3a/0x190 net/nfc/core.c:729
Code: 54 41 89 d4 55 53 48 89 fb 48 8d ab 50 05 00 00 48 83 ec 08 e8 27 50 85 f9 48 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 14 01 00 00 48 8d bb 54 05 00
RSP: 0018:ffff8880930df8f8 EFLAGS: 00010206
llcp: nfc_llcp_send_ui_frame: Could not allocate PDU (error=-512)
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000082
RDX: 00000000000000aa RSI: ffffffff87dd3549 RDI: 0000000000000000
RBP: 0000000000000550 R08: ffff8880930df9a8 R09: 000000000000087f
R10: 0000000000000003 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000082 R14: ffff8880aa51b180 R15: ffff8880930df9a8
FS:  00007f2149900700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f21499c501d CR3: 00000000aaa6c000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 nfc_llcp_send_ui_frame+0x29c/0x400 net/nfc/llcp_commands.c:775
 llcp_sock_sendmsg+0x2b0/0x3a0 net/nfc/llcp_sock.c:810
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:661
 ___sys_sendmsg+0x3b3/0x8e0 net/socket.c:2227
llcp: nfc_llcp_send_ui_frame: Could not allocate PDU (error=-512)
 __sys_sendmmsg+0x195/0x470 net/socket.c:2322
 __do_sys_sendmmsg net/socket.c:2351 [inline]
 __se_sys_sendmmsg net/socket.c:2348 [inline]
 __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2348
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f214996fc79
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:00007f21499002f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 000000000000001f RCX: 00007f214996fc79
RDX: 0000000000000002 RSI: 0000000020004cc0 RDI: 0000000000000003
RBP: 00007f21499f83f8 R08: 0000000000000000 R09: 0000000000000000
llcp: nfc_llcp_send_ui_frame: Could not allocate PDU (error=-512)
R10: 0000000020000000 R11: 0000000000000246 R12: 00007f21499f83f0
R13: 00007f21499c5870 R14: f981dd66eb1318f7 R15: 767247392c94a869
Modules linked in:
---[ end trace e79f6eca90501db4 ]---
RIP: 0010:nfc_alloc_send_skb+0x3a/0x190 net/nfc/core.c:729
Code: 54 41 89 d4 55 53 48 89 fb 48 8d ab 50 05 00 00 48 83 ec 08 e8 27 50 85 f9 48 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 14 01 00 00 48 8d bb 54 05 00
RSP: 0018:ffff8880930df8f8 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000082
RDX: 00000000000000aa RSI: ffffffff87dd3549 RDI: 0000000000000000
RBP: 0000000000000550 R08: ffff8880930df9a8 R09: 000000000000087f
R10: 0000000000000003 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000082 R14: ffff8880aa51b180 R15: ffff8880930df9a8
FS:  00007f2149900700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
llcp: nfc_llcp_send_ui_frame: Could not allocate PDU (error=-512)
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000304 CR3: 00000000aaa6c000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	54                   	push   %rsp
   1:	41 89 d4             	mov    %edx,%r12d
   4:	55                   	push   %rbp
   5:	53                   	push   %rbx
   6:	48 89 fb             	mov    %rdi,%rbx
   9:	48 8d ab 50 05 00 00 	lea    0x550(%rbx),%rbp
  10:	48 83 ec 08          	sub    $0x8,%rsp
  14:	e8 27 50 85 f9       	callq  0xf9855040
  19:	48 89 ea             	mov    %rbp,%rdx
  1c:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  23:	fc ff df
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	0f b6 04 02          	movzbl (%rdx,%rax,1),%eax <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	74 08                	je     0x3a
  32:	3c 03                	cmp    $0x3,%al
  34:	0f 8e 14 01 00 00    	jle    0x14e
  3a:	48                   	rex.W
  3b:	8d                   	.byte 0x8d
  3c:	bb                   	.byte 0xbb
  3d:	54                   	push   %rsp
  3e:	05                   	.byte 0x5

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/09/22 02:47 linux-4.19.y 3f8a27f9e27b 60af5050 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 general protection fault in nfc_alloc_send_skb
2021/12/31 22:20 linux-4.19.y 3f8a27f9e27b 36bd2e48 .config console log report syz C ci2-linux-4-19 general protection fault in nfc_alloc_send_skb
2022/09/22 01:31 linux-4.19.y 3f8a27f9e27b 60af5050 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 general protection fault in nfc_alloc_send_skb
* Struck through repros no longer work on HEAD.