{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "b217127e5e4ee0ecfce7c5f84cfe082238123bda"
            },
            {
              "fixed": "ab557f5cd993a3201b09593633d04b891263d5c0"
            },
            {
              "fixed": "f8b55a465b0e8a500179808166fe9420f5c091a1"
            },
            {
              "fixed": "9af7437669b72f804fc4269f487528dbbed142a2"
            },
            {
              "fixed": "8ce34dccbe8fa7d2ef86f2d8e7db2a9b67cabfc3"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "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"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42138.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file\n\nIn case of invalid INI file mlxsw_linecard_types_init() deallocates memory\nbut doesn't reset pointer to NULL and returns 0. In case of any error\noccurred after mlxsw_linecard_types_init() call, mlxsw_linecards_init()\ncalls mlxsw_linecard_types_fini() which performs memory deallocation again.\n\nAdd pointer reset to NULL.\n\nFound by Linux Verification Center (linuxtesting.org) with SVACE.",
  "id": "CVE-2024-42138",
  "modified": "2026-07-08T05:38:40.620194688Z",
  "published": "2024-07-30T07:46:32.611Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/8ce34dccbe8fa7d2ef86f2d8e7db2a9b67cabfc3"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/9af7437669b72f804fc4269f487528dbbed142a2"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/ab557f5cd993a3201b09593633d04b891263d5c0"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/f8b55a465b0e8a500179808166fe9420f5c091a1"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42138.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-42138"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.7.5",
  "summary": "mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file"
}