syzbot


general protection fault in tipc_crypto_key_distr

Status: fixed on 2022/02/03 18:42
Reported-by: syzbot+0b1113c062afa05960c4@syzkaller.appspotmail.com
Fix commit: a7d91625863d tipc: check for null after calling kmemdup
First crash: 1112d, last: 1112d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in tipc_crypto_key_distr tipc 15 1102d 1430d 0/28 auto-closed as invalid on 2022/03/16 05:19

Sample crash report:
RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003
RBP: 00007f55badc71d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 00007ffe5fee268f R14: 00007f55badc7300 R15: 0000000000022000
general protection fault, probably for non-canonical address 0xdffffc0000000004: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
CPU: 0 PID: 6534 Comm: syz-executor.0 Not tainted 5.10.77-syzkaller-01258-g76698ea35fd3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:tipc_aead_key_size include/uapi/linux/tipc.h:254 [inline]
RIP: 0010:tipc_crypto_key_xmit net/tipc/crypto.c:2235 [inline]
RIP: 0010:tipc_crypto_key_distr+0x3ec/0xba0 net/tipc/crypto.c:2201
Code: 8a 04 38 84 c0 0f 85 be 05 00 00 66 c7 84 24 d0 00 00 00 00 00 48 8b 44 24 20 48 8d 58 20 48 89 d8 48 c1 e8 03 48 89 44 24 48 <42> 8a 04 38 84 c0 0f 85 b0 05 00 00 8b 03 83 c0 24 44 0f b7 f8 41
RSP: 0018:ffffc900012a7200 EFLAGS: 00010202
RAX: 0000000000000004 RBX: 0000000000000020 RCX: 00000000012a7201
RDX: 0000000000000018 RSI: 0000000000000000 RDI: ffffc900012a72a8
RBP: ffffc900012a7350 R08: dffffc0000000000 R09: ffffc900012a7290
R10: fffff52000254e55 R11: 0000000000000000 R12: ffffc900012a7290
R13: ffff8881158f1800 R14: ffffc900012a72d0 R15: dffffc0000000000
FS:  00007f55badc7700(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2e221000 CR3: 0000000152dcb000 CR4: 00000000003526b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __tipc_nl_node_set_key net/tipc/node.c:2973 [inline]
 tipc_nl_node_set_key+0x87d/0xaa0 net/tipc/node.c:2988
 genl_family_rcv_msg_doit net/netlink/genetlink.c:739 [inline]
 genl_family_rcv_msg net/netlink/genetlink.c:783 [inline]
 genl_rcv_msg+0x102b/0x1480 net/netlink/genetlink.c:800
 netlink_rcv_skb+0x200/0x470 net/netlink/af_netlink.c:2502
 genl_rcv+0x28/0x40 net/netlink/genetlink.c:811
 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline]
 netlink_unicast+0x814/0x9f0 net/netlink/af_netlink.c:1337
 netlink_sendmsg+0xa20/0xe00 net/netlink/af_netlink.c:1927
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 ____sys_sendmsg+0x5b9/0x910 net/socket.c:2343
 ___sys_sendmsg net/socket.c:2397 [inline]
 __sys_sendmsg+0x384/0x470 net/socket.c:2430
 __do_sys_sendmsg net/socket.c:2439 [inline]
 __se_sys_sendmsg net/socket.c:2437 [inline]
 __x64_sys_sendmsg+0x7f/0x90 net/socket.c:2437
 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f55bd050ae9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f55badc7188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f55bd163f60 RCX: 00007f55bd050ae9
RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003
RBP: 00007f55badc71d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 00007ffe5fee268f R14: 00007f55badc7300 R15: 0000000000022000
Modules linked in:
---[ end trace 8a62344245b2e390 ]---
RIP: 0010:tipc_aead_key_size include/uapi/linux/tipc.h:254 [inline]
RIP: 0010:tipc_crypto_key_xmit net/tipc/crypto.c:2235 [inline]
RIP: 0010:tipc_crypto_key_distr+0x3ec/0xba0 net/tipc/crypto.c:2201
Code: 8a 04 38 84 c0 0f 85 be 05 00 00 66 c7 84 24 d0 00 00 00 00 00 48 8b 44 24 20 48 8d 58 20 48 89 d8 48 c1 e8 03 48 89 44 24 48 <42> 8a 04 38 84 c0 0f 85 b0 05 00 00 8b 03 83 c0 24 44 0f b7 f8 41
RSP: 0018:ffffc900012a7200 EFLAGS: 00010202
RAX: 0000000000000004 RBX: 0000000000000020 RCX: 00000000012a7201
RDX: 0000000000000018 RSI: 0000000000000000 RDI: ffffc900012a72a8
RBP: ffffc900012a7350 R08: dffffc0000000000 R09: ffffc900012a7290
R10: fffff52000254e55 R11: 0000000000000000 R12: ffffc900012a7290
R13: ffff8881158f1800 R14: ffffc900012a72d0 R15: dffffc0000000000
FS:  00007f55badc7700(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f55bcff7b11 CR3: 0000000152dcb000 CR4: 00000000003526b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	8a 04 38             	mov    (%rax,%rdi,1),%al
   3:	84 c0                	test   %al,%al
   5:	0f 85 be 05 00 00    	jne    0x5c9
   b:	66 c7 84 24 d0 00 00 	movw   $0x0,0xd0(%rsp)
  12:	00 00 00
  15:	48 8b 44 24 20       	mov    0x20(%rsp),%rax
  1a:	48 8d 58 20          	lea    0x20(%rax),%rbx
  1e:	48 89 d8             	mov    %rbx,%rax
  21:	48 c1 e8 03          	shr    $0x3,%rax
  25:	48 89 44 24 48       	mov    %rax,0x48(%rsp)
* 2a:	42 8a 04 38          	mov    (%rax,%r15,1),%al <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	0f 85 b0 05 00 00    	jne    0x5e6
  36:	8b 03                	mov    (%rbx),%eax
  38:	83 c0 24             	add    $0x24,%eax
  3b:	44 0f b7 f8          	movzwl %ax,%r15d
  3f:	41                   	rex.B

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/11/06 13:55 android12-5.10-lts 76698ea35fd3 4c1be0be .config console log report info ci2-android-5-10 general protection fault in tipc_crypto_key_distr
* Struck through repros no longer work on HEAD.