CVE-2024-40910: Vulnerability in Linux Linux
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().
AI Analysis
Technical Summary
CVE-2024-40910 is a vulnerability identified in the Linux kernel's AX.25 protocol implementation, specifically related to reference count management on inbound connections. AX.25 is a protocol used primarily in amateur packet radio networks, and its implementation in the Linux kernel manages network devices and sockets accordingly. The vulnerability arises from a refcount imbalance in the ax25_release() function, where netdev_put() is called to decrement the reference count on the associated AX.25 device when a socket is released. However, the execution path for accepting incoming connections via ax25_accept() does not call netdev_hold(), which would increment the reference count. This mismatch causes the reference count to be decremented without a corresponding increment, leading to refcount underflow errors. These errors manifest as kernel warnings such as "refcount_t: decrement hit 0; leaking memory" and "refcount_t: underflow; use-after-free," followed by kernel crashes. Additionally, attempts to reboot or remove the affected network interface result in the kernel hanging in an infinite loop waiting for the interface to become free, due to the incorrect reference count state. The patch for this vulnerability ensures that netdev_hold() and ax25_dev_hold() are called for new connections in ax25_accept(), aligning the reference count increment logic with that of ax25_bind(). This correction prevents the refcount imbalance and the resulting kernel instability. While AX.25 is a niche protocol, the vulnerability affects Linux kernel versions containing the specified commits and hashes, and can cause denial of service through kernel crashes and system hangs. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.
Potential Impact
For European organizations, the impact of CVE-2024-40910 largely depends on the use of Linux systems running the vulnerable kernel versions and specifically utilizing the AX.25 protocol. Although AX.25 is primarily used in amateur radio and specialized communication systems, certain research institutions, emergency communication networks, or niche industrial applications in Europe might rely on it. Exploitation of this vulnerability can lead to kernel crashes and system hangs, resulting in denial of service (DoS). This could disrupt critical services or communications if such systems are part of operational infrastructure. The infinite loop on interface removal or system reboot could complicate recovery efforts, increasing downtime. Given the lack of authentication or user interaction requirements, an attacker with network access to the affected AX.25 interface could potentially trigger the vulnerability remotely. However, the limited deployment of AX.25 reduces the broad impact. Still, organizations involved in amateur radio, emergency services, or specialized communication sectors in Europe should consider this a significant risk to system stability and availability.
Mitigation Recommendations
To mitigate CVE-2024-40910, European organizations should: 1) Apply the official Linux kernel patches that address the reference count imbalance in the AX.25 implementation as soon as they become available from trusted Linux distributions or kernel maintainers. 2) If patching is not immediately feasible, consider disabling the AX.25 protocol support in the kernel configuration or unloading the ax25 kernel module to prevent exposure. 3) Monitor systems for kernel warnings related to refcount underflow or memory leaks, and investigate any unexpected kernel crashes or interface removal issues. 4) Restrict network access to AX.25 interfaces to trusted users and networks, minimizing the attack surface. 5) Implement robust system monitoring and automated recovery mechanisms to handle potential kernel panics or hangs caused by this vulnerability. 6) Coordinate with vendors and maintain awareness of updates regarding this vulnerability to ensure timely remediation.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Poland, Belgium, Sweden, Finland
CVE-2024-40910: Vulnerability in Linux Linux
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().
AI-Powered Analysis
Technical Analysis
CVE-2024-40910 is a vulnerability identified in the Linux kernel's AX.25 protocol implementation, specifically related to reference count management on inbound connections. AX.25 is a protocol used primarily in amateur packet radio networks, and its implementation in the Linux kernel manages network devices and sockets accordingly. The vulnerability arises from a refcount imbalance in the ax25_release() function, where netdev_put() is called to decrement the reference count on the associated AX.25 device when a socket is released. However, the execution path for accepting incoming connections via ax25_accept() does not call netdev_hold(), which would increment the reference count. This mismatch causes the reference count to be decremented without a corresponding increment, leading to refcount underflow errors. These errors manifest as kernel warnings such as "refcount_t: decrement hit 0; leaking memory" and "refcount_t: underflow; use-after-free," followed by kernel crashes. Additionally, attempts to reboot or remove the affected network interface result in the kernel hanging in an infinite loop waiting for the interface to become free, due to the incorrect reference count state. The patch for this vulnerability ensures that netdev_hold() and ax25_dev_hold() are called for new connections in ax25_accept(), aligning the reference count increment logic with that of ax25_bind(). This correction prevents the refcount imbalance and the resulting kernel instability. While AX.25 is a niche protocol, the vulnerability affects Linux kernel versions containing the specified commits and hashes, and can cause denial of service through kernel crashes and system hangs. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.
Potential Impact
For European organizations, the impact of CVE-2024-40910 largely depends on the use of Linux systems running the vulnerable kernel versions and specifically utilizing the AX.25 protocol. Although AX.25 is primarily used in amateur radio and specialized communication systems, certain research institutions, emergency communication networks, or niche industrial applications in Europe might rely on it. Exploitation of this vulnerability can lead to kernel crashes and system hangs, resulting in denial of service (DoS). This could disrupt critical services or communications if such systems are part of operational infrastructure. The infinite loop on interface removal or system reboot could complicate recovery efforts, increasing downtime. Given the lack of authentication or user interaction requirements, an attacker with network access to the affected AX.25 interface could potentially trigger the vulnerability remotely. However, the limited deployment of AX.25 reduces the broad impact. Still, organizations involved in amateur radio, emergency services, or specialized communication sectors in Europe should consider this a significant risk to system stability and availability.
Mitigation Recommendations
To mitigate CVE-2024-40910, European organizations should: 1) Apply the official Linux kernel patches that address the reference count imbalance in the AX.25 implementation as soon as they become available from trusted Linux distributions or kernel maintainers. 2) If patching is not immediately feasible, consider disabling the AX.25 protocol support in the kernel configuration or unloading the ax25 kernel module to prevent exposure. 3) Monitor systems for kernel warnings related to refcount underflow or memory leaks, and investigate any unexpected kernel crashes or interface removal issues. 4) Restrict network access to AX.25 interfaces to trusted users and networks, minimizing the attack surface. 5) Implement robust system monitoring and automated recovery mechanisms to handle potential kernel panics or hangs caused by this vulnerability. 6) Coordinate with vendors and maintain awareness of updates regarding this vulnerability to ensure timely remediation.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-07-12T12:17:45.580Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9821c4522896dcbdde83
Added to database: 5/21/2025, 9:08:49 AM
Last enriched: 6/28/2025, 4:10:25 AM
Last updated: 8/1/2025, 12:28:23 PM
Views: 14
Related Threats
CVE-2025-50610: n/a
HighCVE-2025-50609: n/a
HighCVE-2025-50608: n/a
HighCVE-2025-55194: CWE-248: Uncaught Exception in Part-DB Part-DB-server
MediumCVE-2025-55197: CWE-400: Uncontrolled Resource Consumption in py-pdf pypdf
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.