CVE-2024-38602: ax25: Fix reference count leak issues of ax25_dev
In the Linux kernel, the following vulnerability has been resolved:
ax25: Fix reference count leak issues of ax25dev
The ax25addrax25dev() and ax25devdevicedown() exist a reference count leak issue of the object "ax25dev".
Memory leak issue in ax25addrax25dev():
The reference count of the object "ax25dev" can be increased multiple times in ax25addrax25dev(). This will cause a memory leak.
Memory leak issues in ax25devdevicedown():
The reference count of ax25dev is set to 1 in ax25devdeviceup() and then increase the reference count when ax25dev is added to ax25devlist. As a result, the reference count of ax25dev is 2. But when the device is shutting down. The ax25devdevicedown() drops the reference count once or twice depending on if we goto unlockput or not, which will cause memory leak.
As for the issue of ax25addrax25dev(), it is impossible for one pointer to be on a list twice. So add a break in ax25addrax25dev(). As for the issue of ax25devdevicedown(), increase the reference count of ax25dev once in ax25devdeviceup() and decrease the reference count of ax25dev after it is removed from the ax25devlist.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Compensating control
Fix the ax25_dev reference counting: add a break in ax25_addr_ax25dev() to prevent the ax25_dev reference count from being increased multiple times, increase the reference count once in ax25_dev_device_up(), and decrease it after ax25_dev is removed from ax25_dev_list.
Event History
Frequently Asked Questions
What is the severity of CVE-2024-38602?
CVE-2024-38602 has a medium severity rating due to reference count leak vulnerabilities in the ax25_dev object.
How do I fix CVE-2024-38602?
To fix CVE-2024-38602, update your Linux kernel to a version that is patched, such as 6.1.123-1 or 6.12.12-1.
Which versions of the Linux kernel are affected by CVE-2024-38602?
CVE-2024-38602 affects Linux kernel versions between 5.17 to 6.1.93, 6.2 to 6.6.33, 6.7 to 6.8.12, and 6.9 to 6.9.3.
What components are vulnerable in CVE-2024-38602?
CVE-2024-38602 specifically impacts the ax25_addr_ax25dev() and ax25_dev_device_down() functions due to a reference count leak.
Is CVE-2024-38602 specific to any Linux distribution?
CVE-2024-38602 is related to the Linux kernel and can affect multiple distributions that utilize affected versions, such as Debian.