CVE-2024-27038

clk: Fix clk_core_get NULL dereference

State
Published
Severity
Not scored
Published
May 1, 2024
Updated
Oct 15, 2026
Reserved
Feb 19, 2024

Read the record on cve.org

Description

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • dde4eff47c82c52a72af333d9e55370eee6d95d6 to before d7ae7d1265686b55832a445b1db8cdd69738ac07Affected
  • dde4eff47c82c52a72af333d9e55370eee6d95d6 to before 239174535dba11f7b83de0eaaa27909024f8c185Affected
  • dde4eff47c82c52a72af333d9e55370eee6d95d6 to before 0efb9ef6fb95384ba631d6819e66f10392aabfa2Affected
  • dde4eff47c82c52a72af333d9e55370eee6d95d6 to before a8b2b26fdd011ebe36d68a9a321ca45801685959Affected
  • dde4eff47c82c52a72af333d9e55370eee6d95d6 to before a5d9b1aa61b401867b9066d54086b3e4ee91f8edAffected
  • dde4eff47c82c52a72af333d9e55370eee6d95d6 to before c554badcae9c45b737a22d23454170c6020b90e6Affected
  • dde4eff47c82c52a72af333d9e55370eee6d95d6 to before 6f073b24a9e2becd25ac4505a9780a87e621bb51Affected
  • dde4eff47c82c52a72af333d9e55370eee6d95d6 to before e97fe4901e0f59a0bfd524578fe3768f8ca42428Affected
LinuxLinux
  • 5.2Affected
  • before 5.2Not affected
  • 5.4.273 through 5.4.*Not affected
  • 5.10.214 through 5.10.*Not affected
  • 5.15.153 through 5.15.*Not affected
  • 6.1.83 through 6.1.*Not affected
  • 6.6.23 through 6.6.*Not affected
  • 6.7.11 through 6.7.*Not affected
  • 6.8.2 through 6.8.*Not affected
  • 6.9 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.