syzbot


WARNING: refcount bug in ax25_release (3)

Status: upstream: reported C repro on 2024/05/26 23:38
Subsystems: hams
[Documentation on labels]
Reported-by: syzbot+33841dc6aa3e1d86b78a@syzkaller.appspotmail.com
Fix commit: bca0902e6173 ax25: Fix refcount leak caused by setting SO_BINDTODEVICE sockopt 2f6efbabceb6 ax25: Remove broken autobind
Patched on: [ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-kmsan-gce-386-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 309d, last: 20h18m
Cause bisection: introduced by (bisect log) :
commit 9fd75b66b8f68498454d685dc4ba13192ae069b0
Author: Duoming Zhou <duoming@zju.edu.cn>
Date: Fri Mar 18 00:54:04 2022 +0000

  ax25: Fix refcount leaks caused by ax25_cb_del()

Crash: WARNING in ax25_release (log)
Repro: C syz .config
  
Discussions (10)
Title Replies (including bot) Last reply
[PATCH] ax25: Remove broken autobind 2 (2) 2025/03/25 11:21
[PATCH] ax25: Fix refcount leak caused by setting SO_BINDTODEVICE sockopt 1 (1) 2025/02/03 09:12
[syzbot] Monthly hams report (Jan 2025) 0 (1) 2025/01/16 10:12
[syzbot] Monthly hams report (Dec 2024) 0 (1) 2024/12/16 09:45
[syzbot] Monthly hams report (Nov 2024) 0 (1) 2024/11/15 10:49
[syzbot] Monthly hams report (Oct 2024) 0 (1) 2024/10/14 19:37
[syzbot] Monthly hams report (Sep 2024) 0 (1) 2024/09/13 10:03
[syzbot] Monthly hams report (Aug 2024) 0 (1) 2024/08/13 08:52
[syzbot] [hams?] WARNING: refcount bug in ax25_release (3) 0 (3) 2024/06/26 05:29
[syzbot] Monthly hams report (Jun 2024) 0 (1) 2024/06/11 13:40
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 WARNING: refcount bug in ax25_release origin:upstream C 28 16d 285d 0/3 upstream: reported C repro on 2024/06/15 15:04
upstream WARNING: refcount bug in ax25_release hams 1 562d 562d 0/28 closed as invalid on 2023/12/15 13:48
upstream WARNING: refcount bug in ax25_release (2) hams C 240 309d 375d 25/28 fixed on 2024/05/22 23:16

Sample crash report:
netdevsim netdevsim0 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0
ax25_connect(): syz-executor988 uses autobind, please contact jreuter@yaina.de
------------[ cut here ]------------
refcount_t: decrement hit 0; leaking memory.
WARNING: CPU: 0 PID: 5311 at lib/refcount.c:31 refcount_warn_saturate+0xfa/0x1d0 lib/refcount.c:31
Modules linked in:
CPU: 0 UID: 0 PID: 5311 Comm: syz-executor988 Not tainted 6.14.0-rc7-syzkaller-00205-g586de92313fc #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:refcount_warn_saturate+0xfa/0x1d0 lib/refcount.c:31
Code: b2 00 00 00 e8 37 2d cc fc 5b 5d c3 cc cc cc cc e8 2b 2d cc fc c6 05 45 64 31 0b 01 90 48 c7 c7 40 b6 80 8c e8 07 e9 8b fc 90 <0f> 0b 90 90 eb d9 e8 0b 2d cc fc c6 05 22 64 31 0b 01 90 48 c7 c7
RSP: 0018:ffffc9000cf879c8 EFLAGS: 00010246
RAX: ba3f622b21131c00 RBX: ffff8880004e264c RCX: ffff88801d2f2440
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000004 R08: ffffffff81819e52 R09: 1ffff11003f8519a
R10: dffffc0000000000 R11: ffffed1003f8519b R12: ffff8880004e2608
R13: 0000000000000000 R14: ffff8880004e264c R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f842e6772d0 CR3: 000000000e938000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __refcount_dec include/linux/refcount.h:336 [inline]
 refcount_dec include/linux/refcount.h:351 [inline]
 ref_tracker_free+0x6af/0x7e0 lib/ref_tracker.c:236
 netdev_tracker_free include/linux/netdevice.h:4302 [inline]
 netdev_put include/linux/netdevice.h:4319 [inline]
 ax25_release+0x368/0x960 net/ax25/af_ax25.c:1080
 __sock_release net/socket.c:647 [inline]
 sock_close+0xbc/0x240 net/socket.c:1398
 __fput+0x3e9/0x9f0 fs/file_table.c:464
 task_work_run+0x24f/0x310 kernel/task_work.c:227
 exit_task_work include/linux/task_work.h:40 [inline]
 do_exit+0xa2a/0x2940 kernel/exit.c:938
 do_group_exit+0x207/0x2c0 kernel/exit.c:1087
 __do_sys_exit_group kernel/exit.c:1098 [inline]
 __se_sys_exit_group kernel/exit.c:1096 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096
 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f842e5f4229
Code: Unable to access opcode bytes at 0x7f842e5f41ff.
RSP: 002b:00007fff8addf488 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f842e5f4229
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 00007f842e674390 R08: ffffffffffffffb8 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000246 R12: 00007f842e674390
R13: 0000000000000000 R14: 00007f842e676ec0 R15: 00007f842e5c4890
 </TASK>

Crashes (5256):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/23 21:33 upstream 586de92313fc 4e8d3850 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING: refcount bug in ax25_release
2025/03/18 00:37 upstream 4701f33a1070 489e2dc8 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING: refcount bug in ax25_release
2025/03/02 13:30 upstream ece144f151ac c3901742 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING: refcount bug in ax25_release
2025/02/26 22:11 upstream ac9c34d1e45a 6a8fcbc4 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING: refcount bug in ax25_release
2024/12/30 02:19 upstream 4099a71718b0 d3ccff63 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in ax25_release
2024/12/22 03:53 upstream 48f506ad0b68 d7f584ee .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in ax25_release
2024/10/23 18:48 net 34d35b4edbbe 15fa2979 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: refcount bug in ax25_release
2024/12/19 20:21 net-next 6b3099ebca13 1d58202c .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2024/06/24 22:37 net-next 568ebdaba637 215eef4a .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2024/12/20 23:16 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 573067a5a685 1ac6aa80 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: refcount bug in ax25_release
2025/03/27 14:08 upstream 1e1ba8d23dae 20510e88 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING: refcount bug in ax25_release
2025/03/26 14:06 upstream 2df0c02dab82 89d30d73 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING: refcount bug in ax25_release
2025/03/26 00:30 upstream 2df0c02dab82 89d30d73 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING: refcount bug in ax25_release
2025/03/23 14:37 upstream 586de92313fc 4e8d3850 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING: refcount bug in ax25_release
2025/03/22 09:07 upstream 88d324e69ea9 c6512ef7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING: refcount bug in ax25_release
2025/02/20 11:01 upstream 87a132e73910 50668798 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING: refcount bug in ax25_release
2025/02/14 02:25 upstream ab68d7eb7b1a d9a046cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: refcount bug in ax25_release
2024/05/25 15:57 upstream 56fb6f92854f a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING: refcount bug in ax25_release
2025/03/26 16:10 upstream 1e26c5e28ca5 19e40f48 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING: refcount bug in ax25_release
2025/03/20 02:17 upstream a7f2e10ecd8f 3b7445cf .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in ax25_release
2025/02/10 06:55 upstream 69b54314c975 ef44b750 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in ax25_release
2025/03/24 06:20 net ed3ba9b6e280 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 05:03 net ed3ba9b6e280 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 02:17 net ed3ba9b6e280 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 01:37 net ed3ba9b6e280 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: refcount bug in ax25_release
2025/03/23 16:48 net ed3ba9b6e280 4e8d3850 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: refcount bug in ax25_release
2025/03/27 01:58 net-next a19f40d919ca 89d30d73 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/27 00:07 net-next a19f40d919ca 89d30d73 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/26 20:49 net-next a19f40d919ca 89d30d73 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/26 11:41 net-next a19f40d919ca 89d30d73 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/26 08:48 net-next cc04ed502457 89d30d73 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/26 07:09 net-next cc04ed502457 89d30d73 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/26 04:34 net-next cc04ed502457 89d30d73 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/26 02:55 net-next cc04ed502457 89d30d73 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/25 21:57 net-next cc04ed502457 89d30d73 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/25 19:40 net-next 98b2c048e2e2 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/25 18:13 net-next 98b2c048e2e2 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/25 16:15 net-next 98b2c048e2e2 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/25 14:53 net-next 98b2c048e2e2 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/25 13:12 net-next 98b2c048e2e2 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/25 03:51 net-next 6bb0dcb3d321 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 23:14 net-next 6bb0dcb3d321 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 22:10 net-next 6bb0dcb3d321 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 20:26 net-next 6bb0dcb3d321 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 18:31 net-next 6bb0dcb3d321 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 16:27 net-next bfc17c165835 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 15:19 net-next bfc17c165835 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 12:56 net-next bfc17c165835 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 11:20 net-next bfc17c165835 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 10:27 net-next bfc17c165835 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 09:19 net-next bfc17c165835 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 08:01 net-next bfc17c165835 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/24 03:57 net-next bfc17c165835 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/23 23:59 net-next bfc17c165835 4e8d3850 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/23 20:37 net-next bfc17c165835 4e8d3850 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/23 18:49 net-next bfc17c165835 4e8d3850 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/23 13:29 net-next bfc17c165835 4e8d3850 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/23 11:53 net-next bfc17c165835 4e8d3850 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/23 11:29 net-next bfc17c165835 4e8d3850 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/23 08:15 net-next bfc17c165835 4e8d3850 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/23 04:56 net-next bfc17c165835 c6512ef7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/23 03:40 net-next bfc17c165835 c6512ef7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/23 01:16 net-next bfc17c165835 c6512ef7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/23 00:05 net-next bfc17c165835 c6512ef7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/22 20:17 net-next bfc17c165835 c6512ef7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/22 14:07 net-next bfc17c165835 c6512ef7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/03/22 11:46 net-next bfc17c165835 c6512ef7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2024/05/22 23:27 net-next 4b377b4868ef 4d098039 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_release
2025/01/04 20:22 linux-next 8155b4ef3466 f3558dbf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in ax25_release
2025/03/27 05:56 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a2392f333575 20510e88 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: refcount bug in ax25_release
2025/03/18 17:47 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci b5737d35364f 22a6c2b1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: refcount bug in ax25_release
* Struck through repros no longer work on HEAD.