Vulnerability · Published Feb 27, 2025 · Assigned by Linux
CVE-2025-21792ax25: Fix refcount leak caused by setting SO_BINDTODEVICE sockopt
High 7.8
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 15% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.129-1 | DEBIAN-CVE-2025-21792 |
| Debian:13 | linux | 6.12.16-1 | DEBIAN-CVE-2025-21792 |
| Debian:14 | linux | 6.12.16-1 | DEBIAN-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux | 6.8.0-78.78 | USN-7703-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-78.78 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-aws | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1035.37 | USN-7703-1 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1035.37 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1035.37~22.04.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1035.37~22.04.1 | USN-7703-2 |
| Ubuntu:22.04:LTS | linux-azure | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1034.39 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1015.15~24.04.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1034.39~22.04.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1022.23 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-gcp | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1036.38 | USN-7703-2 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1036.38 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1015.15~24.04.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1036.38~22.04.1 | USN-7703-2 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1036.38~22.04.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-gke | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1032.36 | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1032.36 | USN-7703-4 |
| Ubuntu:22.04:LTS | linux-gkeop | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1019.21 | USN-7703-2 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1019.21 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | 6.11.0-26.26~24.04.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-78.78~22.04.1 | USN-7703-4 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-78.78~22.04.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-ibm | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1033.33 | USN-7703-2 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1033.33 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1033.33~22.04.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1033.33~22.04.1 | USN-7703-2 |
| Ubuntu:24.04:LTS | linux-intel | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-intel-iotg | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-kvm | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-lowlatency | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-78.78.1 | USN-7703-1 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-78.78.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | 6.11.0-1014.15~24.04.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-78.78.1~22.04.1 | USN-7703-1 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-78.78.1~22.04.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1035.38 | USN-7703-4 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1035.38 | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1010.10 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1035.38~22.04.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1035.38~22.04.1 | USN-7703-4 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1035.38.1 | USN-7703-4 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1035.38.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1009.9 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1022.22 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-oracle | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1032.33 | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1032.33 | USN-7703-3 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1032.33~22.04.1 | USN-7703-3 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1032.33~22.04.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1035.39 | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1035.39 | USN-7703-4 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-78.78~22.04.1 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-21792 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2025-21792 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | no fix listed | UBUNTU-CVE-2025-21792 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 9fd75b66b8f68498454d685dc4ba13192ae069b0 – before 90056ece99966182dc0e367f3fd2afab46ada8479fd75b66b8f68498454d685dc4ba13192ae069b0 – before 94a0de224ed52eb2ecd4f4cb1b937b674c9fb9559fd75b66b8f68498454d685dc4ba13192ae069b0 – before b58f7ca86a7b8e480c06e30c5163c5d2f4e240239fd75b66b8f68498454d685dc4ba13192ae069b0 – before 470bda72fda0fcf54300466d70ce2de62f7835d29fd75b66b8f68498454d685dc4ba13192ae069b0 – before bca0902e61731a75fc4860c8720168d9f1bae3b6c44a453ffe16eb08acdc6129ac4fa0192dbc0456de55a1338e6a48ff1e41ea8db1432496fbe2a62b9e1e088a57c23251f1cfe9601bbd90ade2ea73b9 |
| Linux | Linux | 5.18 |
References
- https://git.kernel.org/stable/c/90056ece99966182dc0e367f3fd2afab46ada847
- https://git.kernel.org/stable/c/94a0de224ed52eb2ecd4f4cb1b937b674c9fb955
- https://git.kernel.org/stable/c/b58f7ca86a7b8e480c06e30c5163c5d2f4e24023
- https://git.kernel.org/stable/c/470bda72fda0fcf54300466d70ce2de62f7835d2
- https://git.kernel.org/stable/c/bca0902e61731a75fc4860c8720168d9f1bae3b6
- https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html