WARNING: refcount bug in ax25_setsockopt

Status: upstream: reported C repro on 2025/07/11 15:28
Subsystems: hams
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+0ee4da32f91ae2a3f015@syzkaller.appspotmail.com
First crash: 470d, last: 93d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: failed (error log, bisect log)
  
✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision Error
25c24645 patching 💥 WARNING: refcount bug in ax25_setsockopt 2026/05/21 20:55 2026/05/21 21:43 2026/05/21 22:16 d5742584
reproducer did not crash
cf4018a0 assessment-security DenialOfService: ✅ Exploitable: ✅ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ✅ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ WARNING: refcount bug in ax25_setsockopt 2026/05/12 04:54 2026/05/12 04:54 2026/05/12 05:58 d168f260

			
		
Discussions (9)
Title Replies (including bot) Last reply
[syzbot] Monthly hams report (Apr 2026) 0 (1) 2026/04/29 20:32
[syzbot] Monthly hams report (Mar 2026) 0 (1) 2026/03/31 08:06
[syzbot] Monthly hams report (Feb 2026) 0 (1) 2026/02/26 12:58
[syzbot] Monthly hams report (Jan 2026) 0 (1) 2026/01/26 07:12
[syzbot] Monthly hams report (Dec 2025) 0 (1) 2025/12/26 07:48
[syzbot] Monthly hams report (Oct 2025) 0 (1) 2025/10/24 18:48
[syzbot] Monthly hams report (Sep 2025) 0 (1) 2025/09/23 13:33
[syzbot] Monthly hams report (Aug 2025) 0 (1) 2025/08/25 08:40
[syzbot] [hams?] WARNING: refcount bug in ax25_setsockopt 1 (3) 2025/07/12 01:44
Last patch testing requests (11)
Created Duration User Patch Repo Result
2026/07/19 23:38 28m retest repro upstream OK log
2026/07/17 10:05 27m retest repro upstream OK log
2026/07/17 10:05 28m retest repro upstream OK log
2026/06/14 15:40 3h36m retest repro net-next log
2026/05/25 06:52 26m retest repro net-next log
2026/05/10 21:34 26m retest repro upstream log
2026/05/09 11:36 29m retest repro net-next OK log
2026/05/09 11:36 36m retest repro linux-next OK log
2026/05/08 16:27 3h03m retest repro net-next OK log
2026/05/08 16:27 42m retest repro net OK log
2025/07/12 00:58 45m hdanton@sina.com patch net-next OK log

Sample crash report:
------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: lib/refcount.c:25 at refcount_warn_saturate+0x9f/0x110 lib/refcount.c:25, CPU#1: syz.0.656/6713
Modules linked in:
CPU: 1 UID: 0 PID: 6713 Comm: syz.0.656 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
RIP: 0010:refcount_warn_saturate+0x9f/0x110 lib/refcount.c:25
Code: eb 66 85 db 74 3e 83 fb 01 75 4c e8 cb b2 16 fd 48 8d 3d f4 18 6d 0b 67 48 0f b9 3a eb 4a e8 b8 b2 16 fd 48 8d 3d f1 18 6d 0b <67> 48 0f b9 3a eb 37 e8 a5 b2 16 fd 48 8d 3d ee 18 6d 0b 67 48 0f
RSP: 0018:ffffc900037a7d48 EFLAGS: 00010293
RAX: ffffffff84aeee48 RBX: 0000000000000002 RCX: ffff8880293b9e80
RDX: 0000000000000000 RSI: ffffffff8ef017a0 RDI: ffffffff901c0740
RBP: ffffc900037a7e48 R08: ffff8880293b9e80 R09: 0000000000000005
R10: 0000000000000004 R11: 0000000000000000 R12: 1ffff920006f4fb4
R13: 1ffff110042f1105 R14: ffff88807b5f76c8 R15: dffffc0000000000
FS:  0000555579fcf500(0000) GS:ffff888125561000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9ab31456b8 CR3: 000000006cfa0000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 ax25_dev_hold include/net/ax25.h:283 [inline]
 ax25_setsockopt+0xab5/0xc30 net/ax25/af_ax25.c:705
 do_sock_setsockopt+0x17c/0x1b0 net/socket.c:2315
 __sys_setsockopt net/socket.c:2340 [inline]
 __do_sys_setsockopt net/socket.c:2346 [inline]
 __se_sys_setsockopt net/socket.c:2343 [inline]
 __x64_sys_setsockopt+0x13d/0x1b0 net/socket.c:2343
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f0c3d59c799
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffce50cd688 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007f0c3d815fa0 RCX: 00007f0c3d59c799
RDX: 0000000000000019 RSI: 0000000000000101 RDI: 000000000000000a
RBP: 00007f0c3d632c99 R08: 0000000000000010 R09: 0000000000000000
R10: 00002000000001c0 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f0c3d815fac R14: 00007f0c3d815fa0 R15: 00007f0c3d815fa0
 </TASK>
----------------
Code disassembly (best guess):
   0:	eb 66                	jmp    0x68
   2:	85 db                	test   %ebx,%ebx
   4:	74 3e                	je     0x44
   6:	83 fb 01             	cmp    $0x1,%ebx
   9:	75 4c                	jne    0x57
   b:	e8 cb b2 16 fd       	call   0xfd16b2db
  10:	48 8d 3d f4 18 6d 0b 	lea    0xb6d18f4(%rip),%rdi        # 0xb6d190b
  17:	67 48 0f b9 3a       	ud1    (%edx),%rdi
  1c:	eb 4a                	jmp    0x68
  1e:	e8 b8 b2 16 fd       	call   0xfd16b2db
  23:	48 8d 3d f1 18 6d 0b 	lea    0xb6d18f1(%rip),%rdi        # 0xb6d191b
* 2a:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2f:	eb 37                	jmp    0x68
  31:	e8 a5 b2 16 fd       	call   0xfd16b2db
  36:	48 8d 3d ee 18 6d 0b 	lea    0xb6d18ee(%rip),%rdi        # 0xb6d192b
  3d:	67                   	addr32
  3e:	48                   	rex.W
  3f:	0f                   	.byte 0xf

Crashes (32):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/03/22 13:03 net-next fb78a629b4f0 5b92003d .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_setsockopt
2026/02/13 11:10 net-next 37a93dd5c49b 6a673c50 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_setsockopt
2026/04/15 07:20 upstream 508fed679541 e2e976a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: refcount bug in ax25_setsockopt
2026/04/15 05:07 upstream 508fed679541 e2e976a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING: refcount bug in ax25_setsockopt
2026/02/13 01:12 upstream 37a93dd5c49b 504cb1bf .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in ax25_setsockopt
2025/12/14 09:14 upstream 8f0b4cce4481 d1b870e1 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in ax25_setsockopt
2025/12/14 06:38 upstream 9d9c1cfec01c d1b870e1 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: refcount bug in ax25_setsockopt
2025/09/28 01:46 upstream 51a24b7deaae 001c9061 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in ax25_setsockopt
2025/09/27 17:07 upstream fec734e8d564 001c9061 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in ax25_setsockopt
2025/09/26 13:35 upstream 4ff71af020ae 0abd0691 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: refcount bug in ax25_setsockopt
2026/02/15 19:41 net ee5492fd88cf 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/12/28 20:32 net d42bce414d1c d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/12/20 04:52 net 7b8e9264f55a d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/12/20 00:31 net 7b8e9264f55a d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/10/10 04:14 net fea8cdf6738a 7e2882b3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/09/26 18:45 net 4ff71af020ae 0abd0691 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/07/27 22:59 net afd8c2c9e2e2 fb8f743d .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: refcount bug in ax25_setsockopt
2026/04/19 19:09 net-next 1f5ffc672165 303e2802 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_setsockopt
2026/04/19 14:02 net-next 1f5ffc672165 303e2802 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/12/08 18:31 net-next 8f7aa3d3c732 d6526ea3 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/12/08 16:46 net-next 8f7aa3d3c732 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/09/02 20:45 net-next cd8a4cfa6bb4 091ba174 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/08/20 18:58 net-next 5c69e0b395c1 bd178e57 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/07/20 09:43 net-next 4701ee5044fb 7117feec .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/06/09 22:44 net-next 2c7e4a2663a1 4826c28e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/04/12 14:08 net-next faeefc173be4 0bd6db41 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/04/12 11:59 net-next faeefc173be4 0bd6db41 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/04/12 03:42 net-next faeefc173be4 12ba9c21 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: refcount bug in ax25_setsockopt
2026/04/24 08:03 linux-next 4c406406070d 9cfb3ca7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: refcount bug in ax25_setsockopt
2026/04/16 11:14 linux-next e6efabc0afca df15c5f3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce WARNING: refcount bug in ax25_setsockopt
2026/04/15 13:19 linux-next e6efabc0afca c441f497 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce WARNING: refcount bug in ax25_setsockopt
2025/12/09 12:34 linux-next c75caf76ed86 d6526ea3 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce WARNING: refcount bug in ax25_setsockopt
* Struck through repros no longer work on HEAD.