Skip to content
Heist/ feed
Back to feed
UnratedFix available

mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.1.98, 6.6.39, 6.9.9
CVEs
CVE-2024-42138
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 14:42 UTC · Revision 1

Source evidence

mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file

core-osv · Original source

Published 30 Jul 2024, 07:46 UTC

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.

osv:CVE-2024-42138

Kernel

Fixed versions: 6.1.98, 6.6.39, 6.9.9

Complete source record
{
  "id": "1daa3a7bcf230bb641efde4940bac27e3f5a90e60348f248ea0b17fed72b534b",
  "url": "https://osv.dev/vulnerability/CVE-2024-42138",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file",
    "summary": "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.",
    "evidence": "osv:CVE-2024-42138",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.1.98",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.39",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.9.9",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2024-42138",
      "aliases": [
        "CVE-2024-42138"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "b217127e5e4ee0ecfce7c5f84cfe082238123bda"
                },
                {
                  "fixed": "ab557f5cd993a3201b09593633d04b891263d5c0"
                },
                {
                  "fixed": "f8b55a465b0e8a500179808166fe9420f5c091a1"
                },
                {
                  "fixed": "9af7437669b72f804fc4269f487528dbbed142a2"
                },
                {
                  "fixed": "8ce34dccbe8fa7d2ef86f2d8e7db2a9b67cabfc3"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42138.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.19.0"
                },
                {
                  "fixed": "6.1.98"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.39"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.9.9"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42138.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:29.844587163Z",
      "provider": "osv",
      "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://lists.debian.org/debian-lts-announce/2025/01/msg00001.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42138.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-42138",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42138.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-42138",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 496465,
  "published_at": "2024-07-30T07:46:32.611+00:00"
}