syzbot


WARNING: refcount bug in nr_release (3)

Status: auto-closed as invalid on 2022/01/13 09:49
Subsystems: hams
[Documentation on labels]
Reported-by: syzbot+342c8cfbf3eb29cb36e8@syzkaller.appspotmail.com
First crash: 893d, last: 893d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] WARNING: refcount bug in nr_release (3) 0 (1) 2021/11/18 10:36
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: refcount bug in nr_release (4) hams C 24 436d 741d 22/26 fixed on 2023/06/08 14:41
upstream WARNING: refcount bug in nr_release hams 1 1936d 1935d 11/26 fixed on 2019/03/06 07:43
upstream WARNING: refcount bug in nr_release (2) hams 2 961d 951d 0/26 auto-closed as invalid on 2021/11/05 17:37

Sample crash report:
------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 0 PID: 13624 at lib/refcount.c:25 refcount_warn_saturate+0x169/0x1e0 lib/refcount.c:25
Modules linked in:
CPU: 0 PID: 13624 Comm: syz-executor.4 Not tainted 5.15.0-next-20211112-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:refcount_warn_saturate+0x169/0x1e0 lib/refcount.c:25
Code: 09 31 ff 89 de e8 27 70 a0 fd 84 db 0f 85 36 ff ff ff e8 3a 6c a0 fd 48 c7 c7 a0 5f 04 8a c6 05 0e 1e a5 09 01 e8 de 4d 34 05 <0f> 0b e9 17 ff ff ff e8 1b 6c a0 fd 0f b6 1d f3 1d a5 09 31 ff 89
RSP: 0018:ffffc9000282fa70 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88802c4fd7c0 RSI: ffffffff815f5c98 RDI: fffff52000505f40
RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff815efa3e R11: 0000000000000000 R12: ffff88803cd1c200
R13: ffff88803c3d7080 R14: ffff88803cd1c218 R15: ffff888011a4a620
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffdbaf50df8 CR3: 0000000022a02000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 __refcount_add include/linux/refcount.h:199 [inline]
 __refcount_inc include/linux/refcount.h:250 [inline]
 refcount_inc include/linux/refcount.h:267 [inline]
 sock_hold include/net/sock.h:708 [inline]
 nr_release+0x3d1/0x450 net/netrom/af_netrom.c:520
 __sock_release+0xcd/0x280 net/socket.c:649
 sock_close+0x18/0x20 net/socket.c:1314
 __fput+0x286/0x9f0 fs/file_table.c:280
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 exit_task_work include/linux/task_work.h:32 [inline]
 do_exit+0xc14/0x2b40 kernel/exit.c:832
 do_group_exit+0x125/0x310 kernel/exit.c:929
 get_signal+0x47d/0x2220 kernel/signal.c:2830
 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:868
 handle_signal_work kernel/entry/common.c:148 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
 exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f8de835cae9
Code: Unable to access opcode bytes at RIP 0x7f8de835cabf.
RSP: 002b:00007f8de58d2218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f8de846ff68 RCX: 00007f8de835cae9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f8de846ff68
RBP: 00007f8de846ff60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8de846ff6c
R13: 00007ffc7f8041ff R14: 00007f8de58d2300 R15: 0000000000022000
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/11/14 09:48 linux-next f2e19fd15bd7 83f5c9b5 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nr_release
* Struck through repros no longer work on HEAD.