CVE-2024-27038
Assigner: Linux
Published: 2024-05-01T12:53:53.698Z
State: PUBLISHED
descriptions: value: 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.
affected: product: Linux
vendor: Linux
defaultStatus: unaffected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions: version: dde4eff47c82
lessThan: d7ae7d126568
status: affected
versionType: git
version: dde4eff47c82
lessThan: 239174535dba
status: affected
versionType: git
version: dde4eff47c82
lessThan: 0efb9ef6fb95
status: affected
versionType: git
version: dde4eff47c82
lessThan: a8b2b26fdd01
status: affected
versionType: git
version: dde4eff47c82
lessThan: a5d9b1aa61b4
status: affected
versionType: git
version: dde4eff47c82
lessThan: c554badcae9c
status: affected
versionType: git
version: dde4eff47c82
lessThan: 6f073b24a9e2
status: affected
versionType: git
version: dde4eff47c82
lessThan: e97fe4901e0f
status: affected
versionType: git
product: Linux
vendor: Linux
defaultStatus: affected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions: version: 5.2
status: affected
version: 0
lessThan: 5.2
status: unaffected
versionType: custom
version: 5.4.273
lessThanOrEqual: 5.4.*
status: unaffected
versionType: custom
version: 5.10.214
lessThanOrEqual: 5.10.*
status: unaffected
versionType: custom
version: 5.15.153
lessThanOrEqual: 5.15.*
status: unaffected
versionType: custom
version: 6.1.83
lessThanOrEqual: 6.1.*
status: unaffected
versionType: custom
version: 6.6.23
lessThanOrEqual: 6.6.*
status: unaffected
versionType: custom
version: 6.7.11
lessThanOrEqual: 6.7.*
status: unaffected
versionType: custom
version: 6.8.2
lessThanOrEqual: 6.8.*
status: unaffected
versionType: custom
version: 6.9
lessThanOrEqual: *
status: unaffected
versionType: original_commit_for_fix
title: clk: Fix clk_core_get NULL dereference
x_generator: engine: bippy-d175d3acf727