CVE-2024-40910: ax25: Fix refcount imbalance on inbound connections
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().
Security readout for executives and security teams
Plain-English summary
A Linux AX.25 networking bug can mishandle device references when an inbound connection is accepted and later closed. This may crash the kernel or leave interface removal and reboot stuck. Business risk is concentrated in systems that actively use AX.25, rather than ordinary Linux hosts without that configuration.
Executive priority
Treat as high priority for AX.25-enabled systems because failure can crash or hang the operating system. Ordinary hosts without AX.25 use appear less exposed. Identify those systems promptly, apply supported kernel updates, and avoid relying solely on the ambiguous version list.
Technical view
ax25_accept() failed to acquire device references later released by ax25_release(), causing a reference-count imbalance. Reported outcomes include reference underflow, possible use-after-free warnings, kernel crashes, and an infinite wait during AX.25 interface removal. The cited kernel patches add netdev_hold() and ax25_dev_hold() for accepted connections.
Likely exposure
Exposure requires an affected Linux kernel and active AX.25 use, particularly acceptance of inbound AX.25 connections. The CVSS vector indicates adjacent-network reachability without privileges or user interaction. The supplied version data is internally difficult to interpret, so confirm exposure using distribution advisories and inclusion of the cited fixes.
Exploitation context
The bundle marks this CVE as absent from CISA KEV and provides no evidence of active exploitation or a public exploit. It documents a reachable fault path and serious kernel effects, but does not establish reliable compromise of confidentiality or integrity beyond the CVSS assessment.
Researcher notes
The defect is a missing hold on the inbound accept path, while release still decrements references. The supplied record lists multiple stable commits but presents affected and unaffected versions ambiguously. Validate by commit or vendor backport status. Do not infer code execution or active exploitation from the documented refcount failure alone.
Mitigation direction
Update to a vendor-supported kernel containing the cited AX.25 reference-count fix.
Check Linux distribution guidance for the correct fixed package and reboot requirements.
If operationally acceptable, stop using AX.25 until the corrected kernel is installed.
Prioritize AX.25 gateways and other systems accepting inbound AX.25 connections.
Validation and detection
Inventory kernel versions and identify systems configured with AX.25 interfaces.
Confirm the installed kernel includes the cited stable fix or vendor backport.
Review kernel logs for refcount underflow, use-after-free warnings, or ax25_release traces.
Verify AX.25 interfaces can be removed cleanly after the corrected kernel is running.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-40910 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.