# CVE-2025-38160: clk: bcm: rpi: Add NULL check in raspberrypi_clk_register()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2025-07-03T08:36:02.357Z
- Modified: 2026-06-17T09:16:17.643Z
- Weaknesses: CWE-476
- Assigned by: Linux

## Description

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

clk: bcm: rpi: Add NULL check in raspberrypi_clk_register()

devm_kasprintf() returns NULL when memory allocation fails. Currently,
raspberrypi_clk_register() does not check for this case, which results
in a NULL pointer dereference.

Add NULL check after devm_kasprintf() to prevent this issue.

(As written by CVE List.)

## Affected

- Linux Linux: from 93d2725affd65686792f4b57e49ef660f3c8c0f9 before 938f625bd3364cfdc93916739add3b637ff90368; from 93d2725affd65686792f4b57e49ef660f3c8c0f9 before 54ce9bcdaee59d4ef0703f390d55708557818f9e; from 93d2725affd65686792f4b57e49ef660f3c8c0f9 before 52562161df3567cdaedada46834a7a8d8c4ab737; from 93d2725affd65686792f4b57e49ef660f3c8c0f9 before 3c1adc2f8c732ea09e8c4bce5941fec019c6205d; from 93d2725affd65686792f4b57e49ef660f3c8c0f9 before 0a2712cd24ecfeb520af60f6f859b442c7ab01ff; from 93d2725affd65686792f4b57e49ef660f3c8c0f9 before 1b69a5299f28ce8e6afa37c3690dbc14c3a1f53f; from 93d2725affd65686792f4b57e49ef660f3c8c0f9 before 73c46d9a93d071ca69858dea3f569111b03e549e; 5.9 (not affected: before 5.9; from 5.10.239 up to 5.10.*; from 5.15.186 up to 5.15.*; from 6.1.142 up to 6.1.*; from 6.6.94 up to 6.6.*; from 6.12.34 up to 6.12.*; from 6.15.3 up to 6.15.*; from 6.16 up to *)
- linux linux_kernel: from 5.9 before 5.10.239; from 5.11 before 5.15.186; from 5.16 before 6.1.142; from 6.2 before 6.6.94; from 6.7 before 6.12.34; from 6.13 before 6.15.3
- debian debian_linux: 11.0

## References

- <https://git.kernel.org/stable/c/938f625bd3364cfdc93916739add3b637ff90368> (patch)
- <https://git.kernel.org/stable/c/54ce9bcdaee59d4ef0703f390d55708557818f9e> (patch)
- <https://git.kernel.org/stable/c/52562161df3567cdaedada46834a7a8d8c4ab737> (patch)
- <https://git.kernel.org/stable/c/3c1adc2f8c732ea09e8c4bce5941fec019c6205d> (patch)
- <https://git.kernel.org/stable/c/0a2712cd24ecfeb520af60f6f859b442c7ab01ff> (patch)
- <https://git.kernel.org/stable/c/1b69a5299f28ce8e6afa37c3690dbc14c3a1f53f> (patch)
- <https://git.kernel.org/stable/c/73c46d9a93d071ca69858dea3f569111b03e549e> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html> (third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html> (third-party-advisory)

## Sources

- CVE List: [CVE-2025-38160](https://www.cve.org/CVERecord?id=CVE-2025-38160), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-38160](https://nvd.nist.gov/vuln/detail/CVE-2025-38160), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-38160 · Whole record: https://cve.day/CVE-2025-38160.json · Rebuilt by cve.day 2026-11-25T22:59:00.548Z
