syzbot


general protection fault in nldev_stat_set_doit

Status: fixed on 2020/04/15 17:19
Subsystems: rdma
[Documentation on labels]
Reported-by: syzbot+bd4af81bc51ee0283445@syzkaller.appspotmail.com
Fix commit: 78f34a16c286 RDMA/nldev: Fix crash when set a QP to a new counter but QPN is missing
First crash: 1520d, last: 1503d
Cause bisection: introduced by (bisect log) [merge commit]:
commit ef8f3d48afd6a17a0dae8c277c2f539c2f19fd16
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Fri Jul 12 18:40:28 2019 +0000

  Merge branch 'akpm' (patches from Andrew)

Crash: general protection fault in send_hsr_supervision_frame (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH 5.5 000/189] 5.5.9-stable review 206 (206) 2020/03/25 17:53
[PATCH 5.4 000/168] 5.4.25-stable review 177 (177) 2020/03/11 18:09
general protection fault in nldev_stat_set_doit 1 (2) 2020/02/25 07:51
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in nldev_stat_set_doit (2) rdma 12 883d 891d 20/26 fixed on 2022/03/08 16:11

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 10453 Comm: syz-executor116 Not tainted 5.6.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:nla_get_u32 include/net/netlink.h:1474 [inline]
RIP: 0010:nldev_stat_set_doit+0x63c/0xb70 drivers/infiniband/core/nldev.c:1760
Code: fc 01 0f 84 58 03 00 00 e8 51 43 bf fb 4c 8b a3 58 fd ff ff 48 b8 00 00 00 00 00 fc ff df 49 8d 7c 24 04 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 6d
RSP: 0018:ffffc90001fa7350 EFLAGS: 00010247
RAX: dffffc0000000000 RBX: ffffc90001fa7728 RCX: ffffffff85b653f0
RDX: 0000000000000000 RSI: ffffffff85b653ff RDI: 0000000000000004
RBP: ffffc90001fa7750 R08: ffff8880a8bc8480 R09: ffff8880a7e30010
R10: ffffed1014fc61dc R11: ffff8880a7e30ee3 R12: 0000000000000000
R13: ffff88807a1f8000 R14: ffff8880a305d140 R15: 000000009ab00786
FS:  0000000000d0f880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000006254b8 CR3: 00000000957d4000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 rdma_nl_rcv_msg drivers/infiniband/core/netlink.c:195 [inline]
 rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline]
 rdma_nl_rcv+0x5d9/0x980 drivers/infiniband/core/netlink.c:259
 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
 netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1329
 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0xd7/0x130 net/socket.c:672
 ____sys_sendmsg+0x753/0x880 net/socket.c:2343
 ___sys_sendmsg+0x100/0x170 net/socket.c:2397
 __sys_sendmsg+0x105/0x1d0 net/socket.c:2430
 __do_sys_sendmsg net/socket.c:2439 [inline]
 __se_sys_sendmsg net/socket.c:2437 [inline]
 __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2437
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4403d9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff2085b198 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004403d9
RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000004
RBP: 00000000006ca018 R08: 0000000000000008 R09: 00000000004002c8
R10: 000000000000004a R11: 0000000000000246 R12: 0000000000401c60
R13: 0000000000401cf0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 738bb46fc914a545 ]---
RIP: 0010:nla_get_u32 include/net/netlink.h:1474 [inline]
RIP: 0010:nldev_stat_set_doit+0x63c/0xb70 drivers/infiniband/core/nldev.c:1760
Code: fc 01 0f 84 58 03 00 00 e8 51 43 bf fb 4c 8b a3 58 fd ff ff 48 b8 00 00 00 00 00 fc ff df 49 8d 7c 24 04 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 6d
RSP: 0018:ffffc90001fa7350 EFLAGS: 00010247
RAX: dffffc0000000000 RBX: ffffc90001fa7728 RCX: ffffffff85b653f0
RDX: 0000000000000000 RSI: ffffffff85b653ff RDI: 0000000000000004
RBP: ffffc90001fa7750 R08: ffff8880a8bc8480 R09: ffff8880a7e30010
R10: ffffed1014fc61dc R11: ffff8880a7e30ee3 R12: 0000000000000000
R13: ffff88807a1f8000 R14: ffff8880a305d140 R15: 000000009ab00786
FS:  0000000000d0f880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000e19d40 CR3: 00000000957d4000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/01 20:52 upstream 63623fd44972 c88c7b75 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/02/29 13:19 upstream f8788d86ab28 59b57593 .config console log report syz C ci-upstream-kasan-gce-root
2020/02/27 13:18 upstream f8788d86ab28 59b57593 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/02/24 09:58 net-old 39f3b41aa7ca d801cb02 .config console log report syz C ci-upstream-net-this-kasan-gce
2020/02/24 12:35 net-next-old 2045e158fc7f d801cb02 .config console log report syz C ci-upstream-net-kasan-gce
2020/03/13 02:08 linux-next 770fbb32d34e d850e9d0 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/03/03 13:15 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-selinux-root
2020/02/28 04:53 upstream f8788d86ab28 59b57593 .config console log report ci-upstream-kasan-gce-smack-root
* Struck through repros no longer work on HEAD.