CVE-2024-42138·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file In case of invalid INI file mlxsw_linecard_types_init() deallocates memory but doesn't reset pointer to NULL and returns 0. In case of any error occurred after mlxsw_linecard_types_init() call, mlxsw_linecards_init() calls mlxsw_linecard_types_fini() which performs memory deallocation again. Add pointer reset to NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.9.9
- Published
- 2024-07-30
Affected versions
From: 6.7
Until: 6.9.9
Fixed in: 6.9.9
How to fix this CVE
Update your Linux kernel to version 6.9.9 or later to resolve a critical memory management flaw in the mlxsw Mellanox driver. This vulnerability allows a double-free condition when processing invalid INI configuration files, which could lead to kernel memory corruption. Systems running kernel versions 6.7 through 6.9.8 should prioritize this patch immediately.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version with: uname -r
- Verify if mlxsw driver is loaded: lsmod | grep mlxsw
- If mlxsw is present, check if your kernel is between 6.7 and 6.9.8 by comparing output of uname -r against vulnerable versions
- After patching, reboot and confirm new kernel version with uname -r to ensure 6.9.9 or later is active
FAQ
What is CVE-2024-42138?
A double-free memory deallocation vulnerability in the Linux kernel's mlxsw Mellanox driver where invalid INI files trigger improper pointer cleanup, allowing the same memory to be freed twice and corrupting kernel memory.
Is CVE-2024-42138 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are currently available.
What versions of Kernel are affected by CVE-2024-42138?
Linux kernel versions 6.7 through 6.9.8 are vulnerable. Version 6.9.9 and later contain the fix.
How do I check if my server is vulnerable to CVE-2024-42138?
Run 'uname -r' to check your kernel version and verify it falls within 6.7-6.9.8 range, then confirm mlxsw driver presence with 'lsmod | grep mlxsw'.
Does Defensia detect CVE-2024-42138?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-42138 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/8ce34dccbe8fa7d2ef86f2d8e7db2a9b67cabfc3
- https://git.kernel.org/stable/c/9af7437669b72f804fc4269f487528dbbed142a2
- https://git.kernel.org/stable/c/ab557f5cd993a3201b09593633d04b891263d5c0
- https://git.kernel.org/stable/c/f8b55a465b0e8a500179808166fe9420f5c091a1
- https://git.kernel.org/stable/c/8ce34dccbe8fa7d2ef86f2d8e7db2a9b67cabfc3
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-42138. Free for 1 server.
Get started free