CVE-2022-49187

Source
https://cve.org/CVERecord?id=CVE-2022-49187
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49187.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49187
Downstream
Related
Published
2025-02-26T01:55:36.094Z
Modified
2026-03-12T03:24:45.323158Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
clk: Fix clk_hw_get_clk() when dev is NULL
Details

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

clk: Fix clkhwget_clk() when dev is NULL

Any registered clkcore structure can have a NULL pointer in its dev field. While never actually documented, this is evidenced by the wide usage of clkregister and clkhwregister with a NULL device pointer, and the fact that the core ofclkhw_register() function also passes a NULL device pointer.

A call to clkhwgetclk() on a clkhw struct whose clkcore is in that case will result in a NULL pointer derefence when it calls devname() on that NULL device pointer.

Add a test for this case and use NULL as the dev_id if the device pointer is NULL.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49187.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
30d6f8c15d2cd877c1f3d47d8a1064649ebe58e2
Fixed
4be3e4c05d8dd1b83b75652cad88c9e752ec7054
Fixed
d183f20cf5a7b546d4108e796b98210ceb317579
Fixed
23f89fe005b105f0dcc55034c13eb89f9b570fac
Fixed
0c1b56df451716ba207bbf59f303473643eee4fd

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49187.json"