syzbot


WARNING: refcount bug in nfc_llcp_local_put

Status: auto-obsoleted due to no activity on 2022/09/26 07:31
Subsystems: net nfc
[Documentation on labels]
Reported-by: syzbot+0aabbccfb4ec7b744ffd@syzkaller.appspotmail.com
First crash: 1127d, last: 1082d
Cause bisection: introduced by (bisect log) :
commit 997acaf6b4b59c6a9c259740312a69ea549cc684
Author: Mark Rutland <mark.rutland@arm.com>
Date: Mon Jan 11 15:37:07 2021 +0000

  lockdep: report broken irq restoration

Crash: WARNING in kvm_wait (log)
Repro: syz .config
  
Fix bisection: fixed by (bisect log) [merge commit]:
commit 55bc1af3d9115d669570aa633e5428d6e2302e8f
Author: Jakub Kicinski <kuba@kernel.org>
Date: Fri May 7 23:10:12 2021 +0000

  Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] WARNING: refcount bug in nfc_llcp_local_put 0 (1) 2021/03/29 15:53
Last patch testing requests (3)
Created Duration User Patch Repo Result
2022/09/26 05:30 17m retest repro upstream OK log
2022/09/14 02:27 15m retest repro net-old OK log
2022/09/13 23:27 15m retest repro net-old OK log

Sample crash report:
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 9913 at lib/refcount.c:28 refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28
Modules linked in:
CPU: 0 PID: 9913 Comm: syz-executor.1 Not tainted 5.12.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28
Code: e9 db fe ff ff 48 89 df e8 2c c2 ea fd e9 8a fe ff ff e8 72 6a a7 fd 48 c7 c7 e0 b2 c1 89 c6 05 dc 3a e6 09 01 e8 ee 74 fb 04 <0f> 0b e9 af fe ff ff 0f 1f 84 00 00 00 00 00 41 56 41 55 41 54 55
RSP: 0018:ffffc9000aacfcd0 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888043e30000 RSI: ffffffff815bb075 RDI: fffff52001559f8c
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff815b4eae R11: 0000000000000000 R12: 0000000000000000
R13: ffff8881445bc018 R14: ffff8881445bc000 R15: ffff888035fb8e38
FS:  00000000033cc400(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007facd239b028 CR3: 000000002f293000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __refcount_sub_and_test include/linux/refcount.h:283 [inline]
 __refcount_dec_and_test include/linux/refcount.h:315 [inline]
 refcount_dec_and_test include/linux/refcount.h:333 [inline]
 kref_put include/linux/kref.h:64 [inline]
 nfc_llcp_local_put net/nfc/llcp_core.c:183 [inline]
 nfc_llcp_local_put+0x1ab/0x200 net/nfc/llcp_core.c:178
 llcp_sock_destruct+0x81/0x150 net/nfc/llcp_sock.c:950
 __sk_destruct+0x4b/0x900 net/core/sock.c:1795
 sk_destruct+0xbd/0xe0 net/core/sock.c:1839
 __sk_free+0xef/0x3d0 net/core/sock.c:1850
 sk_free+0x78/0xa0 net/core/sock.c:1861
 sock_put include/net/sock.h:1807 [inline]
 llcp_sock_release+0x3c9/0x580 net/nfc/llcp_sock.c:644
 __sock_release+0xcd/0x280 net/socket.c:599
 sock_close+0x18/0x20 net/socket.c:1258
 __fput+0x288/0x920 fs/file_table.c:280
 task_work_run+0xdd/0x1a0 kernel/task_work.c:161
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:174 [inline]
 exit_to_user_mode_prepare+0x272/0x280 kernel/entry/common.c:208
 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:301
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:57
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x41940b
Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44
RSP: 002b:00007ffeb9c7a050 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 000000000041940b
RDX: 0000000000570838 RSI: 0000000000000001 RDI: 0000000000000004
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b320200fc
R10: 00007ffeb9c7a140 R11: 0000000000000293 R12: 0000000000016289
R13: 00000000000003e8 R14: 000000000056bf60 R15: 0000000000016272

Crashes (539):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/08 09:13 upstream d2b6f8a17919 bc5434be .config console log report syz ci-upstream-kasan-gce-selinux-root WARNING: refcount bug in nfc_llcp_local_put
2021/03/28 02:00 net-old 75887e881b19 a8529b82 .config console log report syz ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/03/26 13:19 net-old 75887e881b19 6a383ecf .config console log report syz ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/05 00:26 upstream d2b6f8a17919 06c27ff5 .config console log report info ci-upstream-kasan-gce-root WARNING: refcount bug in nfc_llcp_local_put
2021/05/04 13:56 upstream d2b6f8a17919 09efdd63 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: refcount bug in nfc_llcp_local_put
2021/05/04 12:53 upstream d2b6f8a17919 09efdd63 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: refcount bug in nfc_llcp_local_put
2021/05/04 04:02 upstream d2b6f8a17919 ad61f371 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: refcount bug in nfc_llcp_local_put
2021/05/03 09:09 upstream d2b6f8a17919 77e2b668 .config console log report info ci-upstream-kasan-gce-smack-root WARNING: refcount bug in nfc_llcp_local_put
2021/04/13 10:29 upstream 89698becf06d bfeda1b1 .config console log report info ci-qemu-upstream WARNING: refcount bug in nfc_llcp_local_put
2021/04/22 05:45 upstream 16fc44d6387e 2bc8999a .config console log report info ci-qemu-upstream-386 WARNING: refcount bug in nfc_llcp_local_put
2021/05/07 19:03 net-old bbd6f0a94813 f6da8120 .config console log report info ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/07 10:52 net-old bbd6f0a94813 f6da8120 .config console log report info ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/07 10:09 net-old bbd6f0a94813 f6da8120 .config console log report info ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/06 17:34 net-old bbd6f0a94813 06585184 .config console log report info ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/06 16:18 net-old bbd6f0a94813 06585184 .config console log report info ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/06 12:48 net-old bbd6f0a94813 06c27ff5 .config console log report info ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/06 10:46 net-old bbd6f0a94813 06c27ff5 .config console log report info ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/06 01:40 net-old bbd6f0a94813 06c27ff5 .config console log report info ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/04 19:48 net-old bbd6f0a94813 09efdd63 .config console log report info ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/04 06:55 net-old bbd6f0a94813 09efdd63 .config console log report info ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/04 01:01 net-old bbd6f0a94813 ad61f371 .config console log report info ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/03 18:31 net-old bbd6f0a94813 ad61f371 .config console log report info ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/03 16:49 net-old bbd6f0a94813 ad61f371 .config console log report info ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/03/26 07:16 net-old 75887e881b19 6a383ecf .config console log report info ci-upstream-net-this-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/08 23:17 net-next-old 95aafe911db6 bc5434be .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/08 22:07 net-next-old 95aafe911db6 bc5434be .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/08 18:48 net-next-old 95aafe911db6 bc5434be .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/08 17:32 net-next-old 95aafe911db6 bc5434be .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/08 14:40 net-next-old 95aafe911db6 bc5434be .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/08 11:56 net-next-old 95aafe911db6 bc5434be .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/07 23:36 net-next-old 95aafe911db6 bc5434be .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/07 13:17 net-next-old 95aafe911db6 f6da8120 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/07 08:25 net-next-old 95aafe911db6 06585184 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/07 07:05 net-next-old 95aafe911db6 06585184 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/07 04:35 net-next-old 95aafe911db6 06585184 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/07 00:47 net-next-old 95aafe911db6 06585184 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/06 20:52 net-next-old 95aafe911db6 06585184 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/06 19:40 net-next-old 95aafe911db6 06585184 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/06 10:57 net-next-old 95aafe911db6 06c27ff5 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/06 02:45 net-next-old 95aafe911db6 06c27ff5 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/06 00:36 net-next-old 95aafe911db6 06c27ff5 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/05 23:02 net-next-old 95aafe911db6 06c27ff5 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/05 21:22 net-next-old 95aafe911db6 06c27ff5 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/05 20:08 net-next-old 95aafe911db6 06c27ff5 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/05 18:30 net-next-old 95aafe911db6 06c27ff5 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/05 15:15 net-next-old 95aafe911db6 06c27ff5 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/05 12:40 net-next-old 95aafe911db6 06c27ff5 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/05 09:36 net-next-old 95aafe911db6 06c27ff5 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/05 07:25 net-next-old 95aafe911db6 06c27ff5 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/04 22:22 net-next-old 95aafe911db6 06c27ff5 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/05/04 04:00 net-next-old 95aafe911db6 ad61f371 .config console log report info ci-upstream-net-kasan-gce WARNING: refcount bug in nfc_llcp_local_put
2021/04/07 16:54 linux-next 5103a5be098c 6a81331a .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in nfc_llcp_local_put
2021/05/10 15:06 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 18a3c5f7abfd ca873091 .config console log report info ci-qemu2-riscv64 WARNING: refcount bug in nfc_llcp_local_put
2021/05/10 08:11 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 18a3c5f7abfd bc5434be .config console log report info ci-qemu2-riscv64 WARNING: refcount bug in nfc_llcp_local_put
2021/05/08 05:45 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 18a3c5f7abfd bc5434be .config console log report info ci-qemu2-riscv64 WARNING: refcount bug in nfc_llcp_local_put
2021/05/07 14:32 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 18a3c5f7abfd f6da8120 .config console log report info ci-qemu2-riscv64 WARNING: refcount bug in nfc_llcp_local_put
2021/05/06 23:35 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 18a3c5f7abfd 06585184 .config console log report info ci-qemu2-riscv64 WARNING: refcount bug in nfc_llcp_local_put
2021/05/04 21:02 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 18a3c5f7abfd 06c27ff5 .config console log report info ci-qemu2-riscv64 WARNING: refcount bug in nfc_llcp_local_put
2021/05/04 09:38 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 18a3c5f7abfd 09efdd63 .config console log report info ci-qemu2-riscv64 WARNING: refcount bug in nfc_llcp_local_put
* Struck through repros no longer work on HEAD.