syzbot


general protection fault in smc_pnet_add

Status: fixed on 2022/03/08 16:11
Reported-by: syzbot+@syzkaller.appspotmail.com
Fix commit: 7b9b1d449a7c net/smc: fix possible NULL deref in smc_pnet_add_eth()
First crash: 207d, last: 152d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in smc_pnet_add (2) C inconclusive 590 114d 129d 21/23 upstream: reported C repro on 2022/03/31 00:48

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc000000000a: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000050-0x0000000000000057]
CPU: 1 PID: 27345 Comm: syz-executor.0 Not tainted 5.17.0-rc7-syzkaller-00020-gea4424be1688 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:dev_name include/linux/device.h:636 [inline]
RIP: 0010:smc_pnet_find_ib net/smc/smc_pnet.c:314 [inline]
RIP: 0010:smc_pnet_add_ib net/smc/smc_pnet.c:416 [inline]
RIP: 0010:smc_pnet_enter net/smc/smc_pnet.c:515 [inline]
RIP: 0010:smc_pnet_add+0xaa1/0x13c0 net/smc/smc_pnet.c:558
Code: 00 fc ff df 80 3c 08 00 74 08 48 89 df e8 17 82 fd f7 4c 8b 3b 49 8d 5f 50 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 f1 81 fd f7 48 8b 1b 48 85 db 74 07
RSP: 0018:ffffc90002c7f400 EFLAGS: 00010206
RAX: 000000000000000a RBX: 0000000000000050 RCX: dffffc0000000000
RDX: ffff88802bdcba00 RSI: 00000000ffffffff RDI: 0000000000000000
RBP: ffffc90002c7f510 R08: ffffffff89d4cf5a R09: fffff5200058fe3d
R10: fffff5200058fe3d R11: 0000000000000000 R12: ffff88801b705800
R13: ffff88801b705810 R14: 1ffff110036e0b02 R15: 0000000000000000
FS:  00007f525d5db700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2dd22000 CR3: 000000002f236000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 genl_family_rcv_msg_doit net/netlink/genetlink.c:731 [inline]
 genl_family_rcv_msg net/netlink/genetlink.c:775 [inline]
 genl_rcv_msg+0x1032/0x1480 net/netlink/genetlink.c:792
 netlink_rcv_skb+0x200/0x470 net/netlink/af_netlink.c:2494
 genl_rcv+0x24/0x40 net/netlink/genetlink.c:803
 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
 netlink_unicast+0x81a/0x9f0 net/netlink/af_netlink.c:1343
 netlink_sendmsg+0xaec/0xe60 net/netlink/af_netlink.c:1919
 sock_sendmsg_nosec net/socket.c:705 [inline]
 sock_sendmsg net/socket.c:725 [inline]
 ____sys_sendmsg+0x5b9/0x910 net/socket.c:2413
 ___sys_sendmsg net/socket.c:2467 [inline]
 __sys_sendmsg+0x280/0x370 net/socket.c:2496
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f525ec66049
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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f525d5db168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f525ed78f60 RCX: 00007f525ec66049
RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000004
RBP: 00007f525ecc008d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc70aa37cf R14: 00007f525d5db300 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:dev_name include/linux/device.h:636 [inline]
RIP: 0010:smc_pnet_find_ib net/smc/smc_pnet.c:314 [inline]
RIP: 0010:smc_pnet_add_ib net/smc/smc_pnet.c:416 [inline]
RIP: 0010:smc_pnet_enter net/smc/smc_pnet.c:515 [inline]
RIP: 0010:smc_pnet_add+0xaa1/0x13c0 net/smc/smc_pnet.c:558
Code: 00 fc ff df 80 3c 08 00 74 08 48 89 df e8 17 82 fd f7 4c 8b 3b 49 8d 5f 50 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 f1 81 fd f7 48 8b 1b 48 85 db 74 07
RSP: 0018:ffffc90002c7f400 EFLAGS: 00010206
RAX: 000000000000000a RBX: 0000000000000050 RCX: dffffc0000000000
RDX: ffff88802bdcba00 RSI: 00000000ffffffff RDI: 0000000000000000
RBP: ffffc90002c7f510 R08: ffffffff89d4cf5a R09: fffff5200058fe3d
R10: fffff5200058fe3d R11: 0000000000000000 R12: ffff88801b705800
R13: ffff88801b705810 R14: 1ffff110036e0b02 R15: 0000000000000000
FS:  00007f525d5db700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8ecb20f718 CR3: 000000002f236000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 4 bytes skipped:
   0:	80 3c 08 00          	cmpb   $0x0,(%rax,%rcx,1)
   4:	74 08                	je     0xe
   6:	48 89 df             	mov    %rbx,%rdi
   9:	e8 17 82 fd f7       	callq  0xf7fd8225
   e:	4c 8b 3b             	mov    (%rbx),%r15
  11:	49 8d 5f 50          	lea    0x50(%r15),%rbx
  15:	48 89 d8             	mov    %rbx,%rax
  18:	48 c1 e8 03          	shr    $0x3,%rax
  1c:	48 b9 00 00 00 00 00 	movabs $0xdffffc0000000000,%rcx
  23:	fc ff df
* 26:	80 3c 08 00          	cmpb   $0x0,(%rax,%rcx,1) <-- trapping instruction
  2a:	74 08                	je     0x34
  2c:	48 89 df             	mov    %rbx,%rdi
  2f:	e8 f1 81 fd f7       	callq  0xf7fd8225
  34:	48 8b 1b             	mov    (%rbx),%rbx
  37:	48 85 db             	test   %rbx,%rbx
  3a:	74 07                	je     0x43

Crashes (578):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2022/03/08 06:35 upstream ea4424be1688 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-kasan-gce-smack-root 2022/03/07 23:18 upstream ea4424be1688 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-kasan-gce-smack-root 2022/03/07 13:46 upstream ffb217a13a2e 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-kasan-gce-selinux-root 2022/03/07 00:06 upstream ffb217a13a2e 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-kasan-gce-root 2022/03/06 09:53 upstream dcde98da9970 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-kasan-gce-selinux-root 2022/03/05 22:03 upstream 0014404f9c18 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-kasan-gce-smack-root 2022/03/05 13:07 upstream ac84e82f78cb 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-kasan-gce-selinux-root 2022/03/05 11:52 upstream ac84e82f78cb 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-kasan-gce-smack-root 2022/03/04 22:34 upstream 07ebd38a0da2 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-kasan-gce-root 2022/03/04 03:50 upstream 38f80f42147f 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-kasan-gce-root 2022/03/04 03:06 upstream 38f80f42147f 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-qemu-upstream 2022/02/28 03:32 upstream 7e57714cd0ad 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-kasan-gce-selinux-root 2022/01/12 00:21 upstream 6f38be8f2ccd 44d1319a .config log report info general protection fault in smc_pnet_add
ci-qemu-upstream-386 2022/03/08 00:21 upstream ea4424be1688 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-qemu-upstream-386 2022/03/07 20:31 upstream ea4424be1688 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-qemu-upstream-386 2022/03/07 01:59 upstream ffb217a13a2e 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/08 09:40 net c70c453abcbf 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/07 21:34 net bb77bd31c281 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/07 11:32 net afb3cc1a397d 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/07 10:29 net afb3cc1a397d 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/07 09:23 net afb3cc1a397d 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/07 06:44 net afb3cc1a397d 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/07 04:16 net afb3cc1a397d 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/06 21:09 net afb3cc1a397d 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/06 20:04 net afb3cc1a397d 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/06 13:11 net afb3cc1a397d 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/06 04:32 net c6a502c22999 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/05 17:13 net c6a502c22999 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/05 15:36 net c6a502c22999 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/05 13:09 net be4977b847f5 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/05 05:40 net be4977b847f5 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/04 19:06 net 9f3956d6595a 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-this-kasan-gce 2022/03/04 12:16 net 9f3956d6595a 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/08 13:03 net-next 72f00505f2d2 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/08 03:08 net-next 72f00505f2d2 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/07 15:59 net-next 57d29a2935c9 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/07 14:58 net-next 57d29a2935c9 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/06 22:46 net-next 925a24213b5c 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/06 11:42 net-next 925a24213b5c 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/05 14:23 net-next d59e3cbaef70 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/05 10:28 net-next 1039135aedfc 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/05 02:18 net-next 1039135aedfc 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/05 01:01 net-next 1039135aedfc 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/04 11:07 net-next f9f52c347428 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/04 09:00 net-next 80901bff8129 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/04 07:07 net-next 80901bff8129 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/04 05:54 net-next 80901bff8129 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/03 22:30 net-next 80901bff8129 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/03 21:12 net-next 80901bff8129 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-net-kasan-gce 2022/03/03 15:08 net-next 42f0c1934c7c 45a13a73 .config log report info general protection fault in smc_pnet_add
ci-upstream-linux-next-kasan-gce-root 2022/03/05 19:02 linux-next 91265a6da44d 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-linux-next-kasan-gce-root 2022/03/05 18:19 linux-next 91265a6da44d 7bdd8b2c .config log report info general protection fault in smc_pnet_add
ci-upstream-linux-next-kasan-gce-root 2022/03/03 11:51 linux-next 91265a6da44d 45a13a73 .config log report info general protection fault in smc_pnet_add