syzbot


general protection fault in smc_pnet_add (2)

Status: fixed on 2023/02/24 13:50
Subsystems: net s390
[Documentation on labels]
Reported-by: syzbot+03e3e228510223dabd34@syzkaller.appspotmail.com
Fix commit: d22f4f977236 net/smc: Fix NULL pointer dereference in smc_pnet_find_ib()
First crash: 780d, last: 743d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: general protection fault in smc_pnet_add (log)
Repro: C syz .config
  
Discussions (6)
Title Replies (including bot) Last reply
[PATCH 5.17 000/219] 5.17.4-rc1 review 231 (231) 2022/04/20 04:44
[PATCH 5.10 000/105] 5.10.112-rc1 review 112 (112) 2022/04/20 01:39
[PATCH 5.4 00/63] 5.4.190-rc1 review 70 (70) 2022/04/19 12:00
[PATCH 5.15 000/189] 5.15.35-rc1 review 199 (199) 2022/04/19 07:32
[PATCH net 0/3] net/smc: fixes 2022-04-08 6 (6) 2022/04/12 01:40
[syzbot] general protection fault in smc_pnet_add (2) 1 (2) 2022/03/31 06:46
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in smc_pnet_add net s390 578 780d 836d 20/26 fixed on 2022/03/08 16:11
Last patch testing requests (1)
Created Duration User Patch Repo Result
2022/03/31 09:35 8m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/ d82a6c5ef9dc OK

Sample crash report:
infiniband syz: set active
infiniband syz: added veth0_vlan
RDS/IB: syz: added
smc: adding ib device syz with port count 1
smc:    ib device syz port 1 has pnetid 
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: 3599 Comm: syz-executor234 Not tainted 5.17.0-rc6-syzkaller-00199-gc79fcc27be90 #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+0xbfc/0x1740 net/smc/smc_pnet.c:558
Code: 8d be 58 07 00 00 48 89 f8 48 c1 e8 03 80 3c 28 00 0f 85 53 09 00 00 4d 8b a6 58 07 00 00 49 8d 7c 24 50 48 89 f8 48 c1 e8 03 <80> 3c 28 00 0f 85 2c 09 00 00 4d 8b 74 24 50 4d 85 f6 0f 85 21 ff
RSP: 0018:ffffc90001cff540 EFLAGS: 00010206
RAX: 000000000000000a RBX: ffff88801ee97800 RCX: 0000000000000000
RDX: ffff8880233a1d00 RSI: ffffffff88c757d1 RDI: 0000000000000050
RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffc90001cff47f
R10: ffffffff88c757c3 R11: 1ffffffff1eefcc3 R12: 0000000000000000
R13: ffff888071ca1418 R14: ffff88807795c000 R15: ffff88801ee97810
FS:  00005555560f8300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb257777300 CR3: 000000007dc4e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 genl_family_rcv_msg_doit+0x228/0x320 net/netlink/genetlink.c:731
 genl_family_rcv_msg net/netlink/genetlink.c:775 [inline]
 genl_rcv_msg+0x328/0x580 net/netlink/genetlink.c:792
 netlink_rcv_skb+0x153/0x420 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+0x539/0x7e0 net/netlink/af_netlink.c:1343
 netlink_sendmsg+0x904/0xe00 net/netlink/af_netlink.c:1919
 sock_sendmsg_nosec net/socket.c:705 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:725
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2413
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2467
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2496
 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:0x7f47e6fe15d9
Code: 28 c3 e8 7a 15 00 00 66 2e 0f 1f 84 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd92cb3bf8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007f47e6fe15d9
RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000005
RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00005555560f82c0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </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+0xbfc/0x1740 net/smc/smc_pnet.c:558
Code: 8d be 58 07 00 00 48 89 f8 48 c1 e8 03 80 3c 28 00 0f 85 53 09 00 00 4d 8b a6 58 07 00 00 49 8d 7c 24 50 48 89 f8 48 c1 e8 03 <80> 3c 28 00 0f 85 2c 09 00 00 4d 8b 74 24 50 4d 85 f6 0f 85 21 ff
RSP: 0018:ffffc90001cff540 EFLAGS: 00010206
RAX: 000000000000000a RBX: ffff88801ee97800 RCX: 0000000000000000
RDX: ffff8880233a1d00 RSI: ffffffff88c757d1 RDI: 0000000000000050
RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffc90001cff47f
R10: ffffffff88c757c3 R11: 1ffffffff1eefcc3 R12: 0000000000000000
R13: ffff888071ca1418 R14: ffff88807795c000 R15: ffff88801ee97810
FS:  00005555560f8300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb257777300 CR3: 000000007dc4e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	8d be 58 07 00 00    	lea    0x758(%rsi),%edi
   6:	48 89 f8             	mov    %rdi,%rax
   9:	48 c1 e8 03          	shr    $0x3,%rax
   d:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1)
  11:	0f 85 53 09 00 00    	jne    0x96a
  17:	4d 8b a6 58 07 00 00 	mov    0x758(%r14),%r12
  1e:	49 8d 7c 24 50       	lea    0x50(%r12),%rdi
  23:	48 89 f8             	mov    %rdi,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1) <-- trapping instruction
  2e:	0f 85 2c 09 00 00    	jne    0x960
  34:	4d 8b 74 24 50       	mov    0x50(%r12),%r14
  39:	4d 85 f6             	test   %r14,%r14
  3c:	0f                   	.byte 0xf
  3d:	85 21                	test   %esp,(%rcx)
  3f:	ff                   	.byte 0xff

Crashes (590):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/03/09 15:01 net-old c79fcc27be90 9e8eaa75 .config console log report syz C ci-upstream-net-this-kasan-gce general protection fault in smc_pnet_add
2022/03/09 14:35 net-next-old d82a6c5ef9dc 9e8eaa75 .config console log report syz C ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/13 19:06 upstream a19944809fe9 b17b2923 .config console log report info ci-qemu-upstream general protection fault in smc_pnet_add
2022/04/13 07:21 upstream a19944809fe9 faabdb86 .config console log report info ci-qemu-upstream general protection fault in smc_pnet_add
2022/04/13 04:20 upstream a19944809fe9 dacb3f1c .config console log report info ci-qemu-upstream general protection fault in smc_pnet_add
2022/04/13 03:11 upstream a19944809fe9 dacb3f1c .config console log report info ci-upstream-kasan-gce-root general protection fault in smc_pnet_add
2022/04/13 02:04 upstream a19944809fe9 dacb3f1c .config console log report info ci-qemu-upstream general protection fault in smc_pnet_add
2022/04/12 21:51 upstream ce522ba9ef7e dacb3f1c .config console log report info ci-qemu-upstream general protection fault in smc_pnet_add
2022/04/12 21:23 upstream ce522ba9ef7e dacb3f1c .config console log report info ci-qemu-upstream general protection fault in smc_pnet_add
2022/04/12 18:01 upstream ce522ba9ef7e dacb3f1c .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in smc_pnet_add
2022/04/12 00:20 upstream ce522ba9ef7e af01ee7d .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in smc_pnet_add
2022/04/11 07:59 upstream ce522ba9ef7e e22c3da3 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in smc_pnet_add
2022/04/11 03:13 upstream 1862a69c9174 e22c3da3 .config console log report info ci-upstream-kasan-gce-root general protection fault in smc_pnet_add
2022/04/10 19:24 upstream 1862a69c9174 e22c3da3 .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in smc_pnet_add
2022/04/09 20:29 upstream f1b45d8ccb98 e22c3da3 .config console log report info ci-upstream-kasan-gce-root general protection fault in smc_pnet_add
2022/04/10 06:06 upstream e1f700ebd6be e22c3da3 .config console log report info ci-qemu-upstream-386 general protection fault in smc_pnet_add
2022/04/11 20:18 net-old e8a64bbaaad1 af01ee7d .config console log report info ci-upstream-net-this-kasan-gce general protection fault in smc_pnet_add
2022/04/11 16:38 net-old e8a64bbaaad1 af01ee7d .config console log report info ci-upstream-net-this-kasan-gce general protection fault in smc_pnet_add
2022/04/11 15:14 net-old e8a64bbaaad1 af01ee7d .config console log report info ci-upstream-net-this-kasan-gce general protection fault in smc_pnet_add
2022/04/11 10:31 net-old e8a64bbaaad1 e22c3da3 .config console log report info ci-upstream-net-this-kasan-gce general protection fault in smc_pnet_add
2022/04/11 03:38 net-old 8d3a6c37d50d e22c3da3 .config console log report info ci-upstream-net-this-kasan-gce general protection fault in smc_pnet_add
2022/04/10 04:33 net-old 8d3a6c37d50d e22c3da3 .config console log report info ci-upstream-net-this-kasan-gce general protection fault in smc_pnet_add
2022/04/10 01:03 net-old 8d3a6c37d50d e22c3da3 .config console log report info ci-upstream-net-this-kasan-gce general protection fault in smc_pnet_add
2022/04/09 23:27 net-old 8d3a6c37d50d e22c3da3 .config console log report info ci-upstream-net-this-kasan-gce general protection fault in smc_pnet_add
2022/04/09 18:18 net-old 8d3a6c37d50d e22c3da3 .config console log report info ci-upstream-net-this-kasan-gce general protection fault in smc_pnet_add
2022/04/09 07:04 net-old e65812fd22eb e22c3da3 .config console log report info ci-upstream-net-this-kasan-gce general protection fault in smc_pnet_add
2022/04/09 05:41 net-old e65812fd22eb e22c3da3 .config console log report info ci-upstream-net-this-kasan-gce general protection fault in smc_pnet_add
2022/04/08 21:25 net-old 73b193f26509 15be3cba .config console log report info ci-upstream-net-this-kasan-gce general protection fault in smc_pnet_add
2022/04/15 03:33 net-next-old caf968b48335 b17b2923 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/14 22:33 net-next-old caf968b48335 b17b2923 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/14 20:31 net-next-old caf968b48335 b17b2923 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/14 05:21 net-next-old 9386ebccfc59 b17b2923 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/13 22:03 net-next-old 9386ebccfc59 b17b2923 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/13 18:02 net-next-old 9386ebccfc59 b17b2923 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/13 06:06 net-next-old f45ba67eb74a faabdb86 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/12 23:36 net-next-old 590032a4d213 dacb3f1c .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/12 16:18 net-next-old 590032a4d213 af01ee7d .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/11 13:59 net-next-old a21437d2b485 af01ee7d .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/11 12:03 net-next-old a21437d2b485 e22c3da3 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/10 17:18 net-next-old 516a2f1f6f3c e22c3da3 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/10 16:05 net-next-old 626a5aaa5067 e22c3da3 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/10 14:17 net-next-old 626a5aaa5067 e22c3da3 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/10 09:25 net-next-old 626a5aaa5067 e22c3da3 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/10 02:40 net-next-old 626a5aaa5067 e22c3da3 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/09 17:15 net-next-old 626a5aaa5067 e22c3da3 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/09 15:36 net-next-old 626a5aaa5067 e22c3da3 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/09 12:58 net-next-old 34ba23b44c66 e22c3da3 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/09 10:20 net-next-old 34ba23b44c66 e22c3da3 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/09 02:38 net-next-old 34ba23b44c66 e22c3da3 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/09 01:08 net-next-old dc2e0617f1fd 15be3cba .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/08 19:40 net-next-old dc2e0617f1fd 15be3cba .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/03/08 17:36 net-next-old d307eab593b2 9e8eaa75 .config console log report info ci-upstream-net-kasan-gce general protection fault in smc_pnet_add
2022/04/12 10:03 linux-next d0c745e7b2d6 af01ee7d .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in smc_pnet_add
2022/04/11 05:51 linux-next d12d7e1cfe38 e22c3da3 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in smc_pnet_add
2022/04/10 11:11 linux-next ff511c1c68a5 e22c3da3 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in smc_pnet_add
2022/04/09 04:09 linux-next ff511c1c68a5 e22c3da3 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in smc_pnet_add
* Struck through repros no longer work on HEAD.