Lucene search

K
cveLinuxCVE-2024-42138
HistoryJul 30, 2024 - 8:15 a.m.

CVE-2024-42138

2024-07-3008:15:05
Linux
web.nvd.nist.gov
27
linux kernel
mlxsw
vulnerability
memory deallocation

AI Score

6.5

Confidence

Low

EPSS

0

Percentile

16.2%

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.

Affected configurations

Vulners
Node
linuxlinux_kernelRange5.196.1.98
OR
linuxlinux_kernelRange6.2.06.6.39
OR
linuxlinux_kernelRange6.7.06.9.9
OR
linuxlinux_kernelRange6.10.0
VendorProductVersionCPE
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/net/ethernet/mellanox/mlxsw/core_linecards.c"
    ],
    "versions": [
      {
        "version": "b217127e5e4e",
        "lessThan": "ab557f5cd993",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "b217127e5e4e",
        "lessThan": "f8b55a465b0e",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "b217127e5e4e",
        "lessThan": "9af7437669b7",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "b217127e5e4e",
        "lessThan": "8ce34dccbe8f",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/net/ethernet/mellanox/mlxsw/core_linecards.c"
    ],
    "versions": [
      {
        "version": "5.19",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "5.19",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.1.98",
        "lessThanOrEqual": "6.1.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.6.39",
        "lessThanOrEqual": "6.6.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.9.9",
        "lessThanOrEqual": "6.9.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.10",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

AI Score

6.5

Confidence

Low

EPSS

0

Percentile

16.2%