CVE-2025-21792 json
ax25: Fix refcount leak caused by setting SO_BINDTODEVICE sockopt
published 2025-02-27 20 mo ago modified 2026-08-05 3 mo ago also EUVD-2025-5128
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 15%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
ax25: Fix refcount leak caused by setting SO_BINDTODEVICE sockopt
If an AX25 device is bound to a socket by setting the SO_BINDTODEVICE socket option, a refcount leak will occur in ax25_release().
Commit 9fd75b66b8f6 ("ax25: Fix refcount leaks caused by ax25_cb_del()") added decrement of device refcounts in ax25_release(). In order for that to work correctly the refcounts must already be incremented when the device is bound to the socket. An AX25 device can be bound to a socket by either calling ax25_bind() or setting SO_BINDTODEVICE socket option. In both cases the refcounts should be incremented, but in fact it is done only in ax25_bind().
This bug leads to the following issue reported by Syzkaller:
================================================================ refcount_t: decrement hit 0; leaking memory. WARNING: CPU: 1 PID: 5932 at lib/refcount.c:31 refcount_warn_saturate+0x1ed/0x210 lib/refcount.c:31 Modules linked in: CPU: 1 UID: 0 PID: 5932 Comm: syz-executor424 Not tainted 6.13.0-rc4-syzkaller-00110-g4099a71718b0 #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+0x1ed/0x210 lib/refcount.c:31 Call Trace: <TASK> __refcount_dec include/linux/refcount.h:336 [inline] refcount_dec include/linux/refcount.h:351 [inline] ref_tracker_free+0x710/0x820 lib/ref_tracker.c:236 netdev_tracker_free include/linux/netdevice.h:4156 [inline] netdev_put include/linux/netdevice.h:4173 [inline] netdev_put include/linux/netdevice.h:4169 [inline] ax25_release+0x33f/0xa10 net/ax25/af_ax25.c:1069 __sock_release+0xb0/0x270 net/socket.c:640 sock_close+0x1c/0x30 net/socket.c:1408 ... do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f ... </TASK> ================================================================
Fix the implementation of ax25_setsockopt() by adding increment of refcounts for the new device bound, and decrement of refcounts for the old unbound device.
Patch / fix
- Linux Linux 4.15, 4.20, 5.5, 5.11, 5.16, 5.18, 6.1.129, 6.6.79, 6.12.16, 6.13.4, 6.14
- linux Debian 12 6.1.129-1
- linux Debian 14, Debian 13 6.12.16-1
debian advisories DEBIAN-CVE-2025-21792
- linux Ubuntu 24.04 LTS 6.8.0-78.78
- linux-aws Ubuntu 24.04 LTS 6.8.0-1035.37
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1036.38
- linux-gke Ubuntu 24.04 LTS 6.8.0-1032.36
- linux-ibm Ubuntu 24.04 LTS 6.8.0-1033.33
- linux-azure Ubuntu 24.04 LTS 6.8.0-1034.39
- linux-gkeop Ubuntu 24.04 LTS 6.8.0-1019.21
- linux-raspi Ubuntu 24.04 LTS 6.8.0-1035.39
ubuntu advisories UBUNTU-CVE-2025-21792
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-rt Real Time Module 15 SP7 6.4.0-150700.7.3.1
- kernel-syms-rt Real Time Module 15 SP7 6.4.0-150700.7.3.1
- kernel-rt_debug Real Time Module 15 SP7 6.4.0-150700.7.3.1
- kernel-source-rt Real Time Module 15 SP7 6.4.0-150700.7.3.1
- kernel-azure SLE Module for Public Cloud 15 SP7 6.4.0-150700.20.3.1
- kernel-syms-azure SLE Module for Public Cloud 15 SP7 6.4.0-150700.20.3.1
- kernel-source-azure SLE Module for Public Cloud 15 SP7 6.4.0-150700.20.3.1
- kernel-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.39.1
suse advisories SUSE-SU-2025:01972-1SUSE-SU-2025:01967-1SUSE-SU-2025:01964-1SUSE-SU-2025:01951-1SUSE-SU-2025:01919-1SUSE-SU-2025:01707-1
- git.kernel.org/stable/c/90056ece99966182dc0e367f3fd2afab46ada847 commit
- git.kernel.org/stable/c/94a0de224ed52eb2ecd4f4cb1b937b674c9fb955 commit
- git.kernel.org/stable/c/b58f7ca86a7b8e480c06e30c5163c5d2f4e24023 commit
- git.kernel.org/stable/c/470bda72fda0fcf54300466d70ce2de62f7835d2 commit
- git.kernel.org/stable/c/bca0902e61731a75fc4860c8720168d9f1bae3b6 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-21792 updated cvss 5.5
kernel: ax25: Fix refcount leak caused by setting SO_BINDTODEVICE sockopt
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux 10 kernelnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 13 mo ago
Exploit prediction
0.24% chance of exploitation in the next 30 days, higher than 15% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CISA ADP | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| CNA | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Technology feeds
References
-
git.kernel.org
/stable/c/90056ece99966182dc0e367f3fd2afab46ada847
mailing-list, patch
-
git.kernel.org
/stable/c/94a0de224ed52eb2ecd4f4cb1b937b674c9fb955
mailing-list, patch
-
git.kernel.org
/stable/c/b58f7ca86a7b8e480c06e30c5163c5d2f4e24023
mailing-list, patch
-
git.kernel.org
/stable/c/470bda72fda0fcf54300466d70ce2de62f7835d2
mailing-list, patch
-
git.kernel.org
/stable/c/bca0902e61731a75fc4860c8720168d9f1bae3b6
mailing-list, patch
- lists.debian.org /debian-lts-announce/2025/03/msg00028.html
Sources
- CVE List CVE-2025-21792
- NVD CVE-2025-21792
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.