# CVE-2024-40910: ax25: Fix refcount imbalance on inbound connections

- Priority: **Routine**
- Reason: Not severe (CVSS 8.8, adjacent network); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-07-12 · Modified: 2026-08-05
- Aliases: UBUNTU-CVE-2024-40910, DEBIAN-CVE-2024-40910
- Record: https://cvemate.com/vulnerability/CVE-2024-40910 · JSON: https://cvemate.com/vulnerability/CVE-2024-40910/json

## Description

```text
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().
```

## Signals

- CVSS: 8.8 high (v3.1, CVE.org) CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.446%, percentile 40.552%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 132)

- debian linux (Debian): \< 6.1.99-1 \| \< 6.9.7-1
- ubuntu linux (Ubuntu): \< 4.4.0-266.300 \| \< 4.15.0-235.247 \| \< 5.4.0-204.224 \| \< 5.15.0-130.140 \| \< 6.8.0-44.44
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 4.4.0-1141.147 \| \< 4.4.0-1179.194 \| \< 4.15.0-1178.191 \| \< 5.4.0-1137.147 \| \< 5.15.0-1076.83 \| \< 6.8.0-1015.16
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1075.82~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1137.147~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1015.16~22.04.1
- ubuntu linux-aws-fips (Ubuntu): \< 4.15.0-2116.122 \| \< 5.4.0-1137.147+fips1 \| All versions (No fix recorded) \| \< 5.15.0-1076.83+fips1
- ubuntu linux-aws-hwe (Ubuntu): \< 4.15.0-1178.191~16.04.1
- ubuntu linux-azure (Ubuntu): \< 4.15.0-1186.201~14.04.1 \| \< 4.15.0-1186.201~16.04.1 \| All versions (No fix recorded) \| \< 5.4.0-1142.149 \| \< 5.15.0-1078.87 \| \< 6.8.0-1014.16
- ubuntu linux-azure-4.15 (Ubuntu): \< 4.15.0-1186.201
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 35)

- <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>
- <https://ubuntu.com/security/CVE-2024-40910>
- <https://www.cve.org/CVERecord?id=CVE-2024-40910>
- <https://git.kernel.org/linus/3c34fb0bd4a4237592c5ecb5b2e2531900c55774>
- <https://ubuntu.com/security/notices/USN-6999-1>
- <https://ubuntu.com/security/notices/USN-7004-1>
- <https://ubuntu.com/security/notices/USN-7005-1>
- <https://ubuntu.com/security/notices/USN-7008-1>
- <https://ubuntu.com/security/notices/USN-7005-2>
- <https://ubuntu.com/security/notices/USN-6999-2>
- <https://ubuntu.com/security/notices/USN-7029-1>
- <https://ubuntu.com/security/notices/USN-7173-1>
- <https://ubuntu.com/security/notices/USN-7173-2>
- <https://ubuntu.com/security/notices/USN-7179-1>
- <https://ubuntu.com/security/notices/USN-7179-2>
- <https://ubuntu.com/security/notices/USN-7186-1>

---

Data as of 2026-12-05T03:44:25.792Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
