Lucene search

K
vulnrichmentLinuxVULNRICHMENT:CVE-2024-27038
HistoryMay 01, 2024 - 12:53 p.m.

CVE-2024-27038 clk: Fix clk_core_get NULL dereference

2024-05-0112:53:53
Linux
github.com
5
linux kernel
vulnerability
fix
dereference
null
commit
clk_core_get

AI Score

7.1

Confidence

Low

SSVC

Exploitation

none

Automatable

no

Technical Impact

partial

In the Linux kernel, the following vulnerability has been resolved:

clk: Fix clk_core_get NULL dereference

It is possible for clk_core_get to dereference a NULL in the following
sequence:

clk_core_get()
of_clk_get_hw_from_clkspec()
__of_clk_get_hw_from_provider()
__clk_get_hw()

__clk_get_hw() can return NULL which is dereferenced by clk_core_get() at
hw->core.

Prior to commit dde4eff47c82 (“clk: Look for parents with clkdev based
clk_lookups”) the check IS_ERR_OR_NULL() was performed which would have
caught the NULL.

Reading the description of this function it talks about returning NULL but
that cannot be so at the moment.

Update the function to check for hw before dereferencing it and return NULL
if hw is NULL.

CNA Affected

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "dde4eff47c82",
        "lessThan": "d7ae7d126568",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "dde4eff47c82",
        "lessThan": "239174535dba",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "dde4eff47c82",
        "lessThan": "0efb9ef6fb95",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "dde4eff47c82",
        "lessThan": "a8b2b26fdd01",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "dde4eff47c82",
        "lessThan": "a5d9b1aa61b4",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "dde4eff47c82",
        "lessThan": "c554badcae9c",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "dde4eff47c82",
        "lessThan": "6f073b24a9e2",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "dde4eff47c82",
        "lessThan": "e97fe4901e0f",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "drivers/clk/clk.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "5.2"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "5.2",
        "versionType": "custom"
      },
      {
        "status": "unaffected",
        "version": "5.4.273",
        "versionType": "custom",
        "lessThanOrEqual": "5.4.*"
      },
      {
        "status": "unaffected",
        "version": "5.10.214",
        "versionType": "custom",
        "lessThanOrEqual": "5.10.*"
      },
      {
        "status": "unaffected",
        "version": "5.15.153",
        "versionType": "custom",
        "lessThanOrEqual": "5.15.*"
      },
      {
        "status": "unaffected",
        "version": "6.1.83",
        "versionType": "custom",
        "lessThanOrEqual": "6.1.*"
      },
      {
        "status": "unaffected",
        "version": "6.6.23",
        "versionType": "custom",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.7.11",
        "versionType": "custom",
        "lessThanOrEqual": "6.7.*"
      },
      {
        "status": "unaffected",
        "version": "6.8.2",
        "versionType": "custom",
        "lessThanOrEqual": "6.8.*"
      },
      {
        "status": "unaffected",
        "version": "6.9",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "drivers/clk/clk.c"
    ],
    "defaultStatus": "affected"
  }
]

AI Score

7.1

Confidence

Low

SSVC

Exploitation

none

Automatable

no

Technical Impact

partial