syzbot


WARNING: refcount bug in nldev_newlink

Status: fixed on 2023/02/24 13:50
Subsystems: rdma
[Documentation on labels]
Reported-by: syzbot+3fd8326d9a0812d19218@syzkaller.appspotmail.com
Fix commit: e42f9c2e6aad RDMA: Add missed netdev_put() for the netdevice_tracker
First crash: 503d, last: 498d
Discussions (2)
Title Replies (including bot) Last reply
Re: [syzbot] WARNING: refcount bug in nldev_newlink 1 (1) 2022/12/09 14:06
[syzbot] WARNING: refcount bug in nldev_newlink 5 (6) 2022/12/09 13:01
Last patch testing requests (1)
Created Duration User Patch Repo Result
2022/12/11 01:43 20m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 591cd61541b9 report log

Sample crash report:
refcount_t: decrement hit 0; leaking memory.
WARNING: CPU: 1 PID: 5148 at lib/refcount.c:31 refcount_warn_saturate+0x1d7/0x1f0 lib/refcount.c:31
Modules linked in:

CPU: 1 PID: 5148 Comm: syz-executor143 Not tainted 6.1.0-rc8-next-20221207-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:refcount_warn_saturate+0x1d7/0x1f0 lib/refcount.c:31
Code: 05 5a 60 51 0a 01 e8 35 0a b5 05 0f 0b e9 d3 fe ff ff e8 6c 9b 75 fd 48 c7 c7 c0 6d a6 8a c6 05 37 60 51 0a 01 e8 16 0a b5 05 <0f> 0b e9 b4 fe ff ff 48 89 ef e8 5a b5 c3 fd e9 5c fe ff ff 0f 1f
RSP: 0018:ffffc90003f5f0d8 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff8880200d0000 RSI: ffffffff8166b1dc RDI: fffff520007ebe0d
RBP: ffff88802ba38600 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000000 R11: 0000000000000000 R12: 1ffff920007ebe20
R13: 0000000000000000 R14: ffff88802ba38600 R15: ffffc90003f5f608
FS:  000055555739a300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4655a533a0 CR3: 0000000027f28000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __refcount_dec include/linux/refcount.h:344 [inline]
 refcount_dec include/linux/refcount.h:359 [inline]
 ref_tracker_free+0x539/0x6b0 lib/ref_tracker.c:118
 netdev_tracker_free include/linux/netdevice.h:4039 [inline]
 netdev_put include/linux/netdevice.h:4056 [inline]
 dev_put include/linux/netdevice.h:4082 [inline]
 nldev_newlink+0x360/0x5d0 drivers/infiniband/core/nldev.c:1733
 rdma_nl_rcv_msg+0x371/0x6a0 drivers/infiniband/core/netlink.c:195
 rdma_nl_rcv_skb.constprop.0.isra.0+0x2fc/0x440 drivers/infiniband/core/netlink.c:239
 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline]
 netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1356
 netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1932
 sock_sendmsg_nosec net/socket.c:714 [inline]
 sock_sendmsg+0xd3/0x120 net/socket.c:734
 ____sys_sendmsg+0x712/0x8c0 net/socket.c:2476
 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2530
 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2559
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f4655a09699
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe675a1dd8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f4655a09699
RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003
RBP: 0000000000000000 R08: 000000000000000d R09: 000000000000000d
R10: 00007ffe675a1850 R11: 0000000000000246 R12: 00007ffe675a1df0
R13: 00000000000f4240 R14: 00000000000104dc R15: 00007ffe675a1de4
 </TASK>

Crashes (33):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/11 05:31 linux-next 591cd61541b9 67be1ae7 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/10 02:33 linux-next 591cd61541b9 67be1ae7 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/07 20:50 linux-next 591cd61541b9 d88f3abb .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/13 05:17 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/13 05:02 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/13 04:35 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/12 20:04 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/12 20:03 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/12 20:03 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/12 15:34 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/12 09:27 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/12 08:00 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/11 22:04 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/11 22:04 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/11 13:04 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/11 00:46 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/11 00:42 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/11 00:38 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/10 22:38 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/10 20:55 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/10 19:27 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/10 11:39 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/10 02:40 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/09 19:57 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/09 14:53 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/09 14:26 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/09 03:47 linux-next 591cd61541b9 1034e5fa .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/09 03:23 linux-next 591cd61541b9 1034e5fa .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/08 08:01 linux-next 591cd61541b9 d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/08 02:19 linux-next 591cd61541b9 d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/07 15:48 linux-next 591cd61541b9 d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/07 11:05 linux-next 591cd61541b9 d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
2022/12/07 06:38 linux-next 591cd61541b9 d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nldev_newlink
* Struck through repros no longer work on HEAD.