syzbot


WARNING: refcount bug in ax25_setsockopt

Status: upstream: reported C repro on 2025/07/11 15:28
Subsystems: hams
[Documentation on labels]
Reported-by: syzbot+0ee4da32f91ae2a3f015@syzkaller.appspotmail.com
First crash: 264d, last: 3d15h
Cause bisection: failed (error log, bisect log)
  
Fix bisection: failed (error log, bisect log)
  
Discussions (5)
Title Replies (including bot) Last reply
[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 (9)
Created Duration User Patch Repo Result
2025/11/26 00:12 1h25m retest repro net report log
2025/10/24 04:33 20m retest repro net-next report log
2025/10/24 04:33 43m retest repro net-next report log
2025/09/16 22:26 26m retest repro net report log
2025/08/10 23:18 29m retest repro net-next report log
2025/07/12 00:58 45m hdanton@sina.com patch net-next OK log
2025/07/05 16:03 21m retest repro net-next report log
2025/04/26 15:09 1h04m retest repro net-next report log
2025/04/26 15:09 40m retest repro net-next report log

Sample crash report:
------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: lib/refcount.c:25 at refcount_warn_saturate+0xf9/0x120 lib/refcount.c:25, CPU#2: syz.0.203/6346
Modules linked in:
CPU: 2 UID: 0 PID: 6346 Comm: syz.0.203 Not tainted syzkaller #0 PREEMPT(full) 
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+0xf9/0x120 lib/refcount.c:25
Code: 5d e9 5b 25 12 fd e8 56 25 12 fd 48 8d 3d 5f 68 e5 0b 67 48 0f b9 3a 5b 5d e9 43 25 12 fd e8 3e 25 12 fd 48 8d 3d 57 68 e5 0b <67> 48 0f b9 3a 5b 5d e9 2b 25 12 fd 48 89 ef e8 63 fb 7b fd e9 35
RSP: 0018:ffffc900032afd30 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000002 RCX: ffffffff84acbe2c
RDX: ffff8880335724c0 RSI: ffffffff84acbec2 RDI: ffffffff90922720
RBP: ffff88803716d2c8 R08: 0000000000000005 R09: 0000000000000004
R10: 0000000000000002 R11: ffff888033572ff0 R12: ffff88803716d2c8
R13: ffff88803716d200 R14: 0000000000000009 R15: ffff88802cd2f000
FS:  0000555585deb500(0000) GS:ffff8880d6af6000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f82cfd156c0 CR3: 000000002bb47000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 __refcount_add include/linux/refcount.h:289 [inline]
 __refcount_inc include/linux/refcount.h:366 [inline]
 refcount_inc include/linux/refcount.h:383 [inline]
 ax25_dev_hold include/net/ax25.h:289 [inline]
 ax25_setsockopt+0x10b3/0x1220 net/ax25/af_ax25.c:705
 do_sock_setsockopt+0xf3/0x1d0 net/socket.c:2322
 __sys_setsockopt+0x1a0/0x230 net/socket.c:2347
 __do_sys_setsockopt net/socket.c:2353 [inline]
 __se_sys_setsockopt net/socket.c:2350 [inline]
 __x64_sys_setsockopt+0xbd/0x160 net/socket.c:2350
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f030358f7c9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc92cce468 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007f03037e5fa0 RCX: 00007f030358f7c9
RDX: 0000000000000019 RSI: 0000000000000101 RDI: 0000000000000004
RBP: 00007f0303613f91 R08: 0000000000000010 R09: 0000000000000000
R10: 0000200000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f03037e5fa0 R14: 00007f03037e5fa0 R15: 0000000000000005
 </TASK>
----------------
Code disassembly (best guess):
   0:	5d                   	pop    %rbp
   1:	e9 5b 25 12 fd       	jmp    0xfd122561
   6:	e8 56 25 12 fd       	call   0xfd122561
   b:	48 8d 3d 5f 68 e5 0b 	lea    0xbe5685f(%rip),%rdi        # 0xbe56871
  12:	67 48 0f b9 3a       	ud1    (%edx),%rdi
  17:	5b                   	pop    %rbx
  18:	5d                   	pop    %rbp
  19:	e9 43 25 12 fd       	jmp    0xfd122561
  1e:	e8 3e 25 12 fd       	call   0xfd122561
  23:	48 8d 3d 57 68 e5 0b 	lea    0xbe56857(%rip),%rdi        # 0xbe56881
* 2a:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2f:	5b                   	pop    %rbx
  30:	5d                   	pop    %rbp
  31:	e9 2b 25 12 fd       	jmp    0xfd122561
  36:	48 89 ef             	mov    %rbp,%rdi
  39:	e8 63 fb 7b fd       	call   0xfd7bfba1
  3e:	e9                   	.byte 0xe9
  3f:	35                   	.byte 0x35

Crashes (21):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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/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/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
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/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/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
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
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/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/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 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
* Struck through repros no longer work on HEAD.