Vulnerability · Published Jul 12, 2024 · Assigned by Linux
CVE-2024-40910ax25: Fix refcount imbalance on inbound connections
High 8.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.4% (higher than 39% 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 imbalance on inbound connections When releasing a socket in ax25_release(), we call netdev_put() to decrease the refcount on the associated ax.25 device. However, the execution path for accepting an incoming connection never calls netdev_hold(). This imbalance leads to refcount errors, and ultimately to kernel crashes. A typical call trace for the above situation will start with one of the following errors: refcount_t: decrement hit 0; leaking memory. refcount_t: underflow; use-after-free. And will then have a trace like: Call Trace: <TASK> ? show_regs+0x64/0x70 ? __warn+0x83/0x120 ? refcount_warn_saturate+0xb2/0x100 ? report_bug+0x158/0x190 ? prb_read_valid+0x20/0x30 ? handle_bug+0x3e/0x70 ? exc_invalid_op+0x1c/0x70 ? asm_exc_invalid_op+0x1f/0x30 ? refcount_warn_saturate+0xb2/0x100 ? refcount_warn_saturate+0xb2/0x100 ax25_release+0x2ad/0x360 __sock_release+0x35/0xa0 sock_close+0x19/0x20 [...] On reboot (or any attempt to remove the interface), the kernel gets stuck in an infinite loop: unregister_netdevice: waiting for ax0 to become free. Usage count = 0 This patch corrects these issues by ensuring that we call netdev_hold() and ax25_dev_hold() for new connections in ax25_accept(). This makes the logic leading to ax25_accept() match the logic for ax25_bind(): in both cases we increment the refcount, which is ultimately decremented in ax25_release().
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.99-1 | DSA-5731-1 |
| Debian:12 | linux | 6.1.99-1 | DEBIAN-CVE-2024-40910 |
| Debian:13 | linux | 6.9.7-1 | DEBIAN-CVE-2024-40910 |
| Debian:14 | linux | 6.9.7-1 | DEBIAN-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux | 5.15.0-130.140 | USN-7179-1 |
| Ubuntu:22.04:LTS | linux | 5.15.0-130.140 | UBUNTU-CVE-2024-40910 |
| Ubuntu:24.04:LTS | linux | 6.8.0-44.44 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1076.83 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1076.83 | USN-7179-2 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1015.16 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1015.16~22.04.1 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1078.87 | USN-7186-2 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1078.87 | UBUNTU-CVE-2024-40910 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1014.16 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1014.16~22.04.1 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1078.87.1 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1074.83 | USN-7179-2 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1074.83 | UBUNTU-CVE-2024-40910 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1014.16 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1014.16~22.04.1 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1072.78 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1072.78 | USN-7179-3 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1010.13 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1057.64 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1057.64 | USN-7179-1 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-45.45~22.04.1 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1067.70 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1067.70 | USN-7179-1 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1012.12 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1012.12~22.04.1 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1071.77 | USN-7186-1 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1071.77 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1071.76 | USN-7179-1 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1071.76 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-128.138 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-128.138 | USN-7179-1 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-44.44.1 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1070.71 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1070.71 | USN-7179-2 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1013.14 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1013.14~22.04.1 | UBUNTU-CVE-2024-40910 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1013.14.1 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1032.32 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1020.20 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1012.12 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1073.79 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1073.79 | USN-7179-2 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1012.12 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1012.12~22.04.1 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1070.73 | USN-7179-2 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1070.73 | UBUNTU-CVE-2024-40910 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1011.12 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-44.44.1 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1041.45 | UBUNTU-CVE-2024-40910 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1041.45 | USN-7179-4 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 9fd75b66b8f68498454d685dc4ba13192ae069b0 – before f4df9d6c8d4e4c818252b0419c2165d66eabd4eb9fd75b66b8f68498454d685dc4ba13192ae069b0 – before 52100fd74ad07b53a4666feafff1cd11436362d39fd75b66b8f68498454d685dc4ba13192ae069b0 – before a723a6c8d4831cc8e2c7b0c9f3f0c010d46719649fd75b66b8f68498454d685dc4ba13192ae069b0 – before 3c34fb0bd4a4237592c5ecb5b2e2531900c55774c44a453ffe16eb08acdc6129ac4fa0192dbc0456de55a1338e6a48ff1e41ea8db1432496fbe2a62b9e1e088a57c23251f1cfe9601bbd90ade2ea73b9b20a5ab0f5fb175750c6bafd4cf12daccf00c738 |
| Linux | Linux | 5.18 |
References
- https://git.kernel.org/stable/c/f4df9d6c8d4e4c818252b0419c2165d66eabd4eb
- https://git.kernel.org/stable/c/52100fd74ad07b53a4666feafff1cd11436362d3
- https://git.kernel.org/stable/c/a723a6c8d4831cc8e2c7b0c9f3f0c010d4671964
- https://git.kernel.org/stable/c/3c34fb0bd4a4237592c5ecb5b2e2531900c55774
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html