CVE-2024-42138: mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file
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.
Security readout for executives and security teams
Plain-English summary
CVE-2024-42138 is a Linux kernel flaw in the mlxsw switch driver. If an invalid INI file is processed, cleanup can free the same memory twice. The public record does not provide CVSS, confirmed impact, or active exploitation evidence, so urgency depends on whether affected mlxsw hardware and kernels are present.
Executive priority
Treat this as a targeted infrastructure patching issue, not a broad emergency. Prioritize network devices and Linux platforms using mlxsw hardware support. Escalate if vendor advisories identify reachable exploitation or business-critical exposed switching infrastructure.
Technical view
The bug is in mlxsw_linecard_types_init() and mlxsw_linecards_init(). Invalid INI handling frees memory without nulling the pointer, then later error cleanup can call mlxsw_linecard_types_fini() and free it again. The kernel fix resets the pointer to NULL. It was found by Linux Verification Center with SVACE.
Likely exposure
Exposure appears concentrated in Linux systems using the mlxsw core linecards code, typically switch or networking platforms with supported Mellanox/NVIDIA Spectrum hardware. General Linux servers without this driver path or affected kernel range are less likely to be exposed.
Exploitation context
The source bundle does not show CISA KEV listing, public exploitation, exploit maturity, or a practical attack path. Evidence supports a kernel double-free bug triggered by invalid INI handling, but not remote exploitability or privilege escalation.
Researcher notes
The public data is limited: no CVSS, CWE, exploit status, or complete environmental prerequisites are provided. Analysis should focus on code ancestry, downstream backports, driver reachability, and whether invalid INI content can be influenced in the target deployment.
Mitigation direction
Update affected Linux kernels to vendor releases containing the listed stable fixes.
Prioritize switch and network appliances using mlxsw linecards or Spectrum hardware.
Apply Debian LTS or distribution kernel updates where applicable.
If immediate patching is delayed, check vendor guidance for supported workarounds.
Track kernel vendor advisories for exact affected package versions.
Validation and detection
Inventory Linux systems and appliances that load or package the mlxsw driver.
Compare kernel versions against vendor advisories and the CVE affected ranges.
Confirm installed kernels include one of the referenced stable fixes or downstream backports.
Review distro security notices, including Debian LTS, for patched package versions.
Monitor kernel logs for mlxsw linecard initialization errors on exposed platforms.
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-42138 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.