# CVE-2025-22067: spi: cadence: Fix out-of-bounds array access in cdns_mrvl_xspi_setup_clock()

- Severity: High 7.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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.22%, higher than 12% of CVEs (2026-12-01)
- Published: 2025-04-16T14:12:20.795Z
- Modified: 2026-06-17T08:44:58.443Z
- Weaknesses: CWE-129
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## Description

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

spi: cadence: Fix out-of-bounds array access in cdns_mrvl_xspi_setup_clock()

If requested_clk > 128, cdns_mrvl_xspi_setup_clock() iterates over the
entire cdns_mrvl_xspi_clk_div_list array without breaking out early,
causing 'i' to go beyond the array bounds.

Fix that by stopping the loop when it gets to the last entry, clamping
the clock to the minimum 6.25 MHz.

Fixes the following warning with an UBSAN kernel:

  vmlinux.o: warning: objtool: cdns_mrvl_xspi_setup_clock: unexpected end of section .text.cdns_mrvl_xspi_setup_clock

(As written by CVE List.)

## Affected

- Linux Linux: from 26d34fdc49712ddbd42b11102f5d9d78a0f42097 before e50781bf7accc75883cb8a6a9921fb4e2fa8cca4; from 26d34fdc49712ddbd42b11102f5d9d78a0f42097 before c1fb84e274cb6a2bce6ba5e65116c06e0b3ab275; from 26d34fdc49712ddbd42b11102f5d9d78a0f42097 before 645f1813fe0dc96381c36b834131e643b798fd73; from 26d34fdc49712ddbd42b11102f5d9d78a0f42097 before 7ba0847fa1c22e7801cebfe5f7b75aee4fae317e; 6.12 (not affected: before 6.12; from 6.12.23 up to 6.12.*; from 6.13.11 up to 6.13.*; from 6.14.2 up to 6.14.*; from 6.15 up to *)
- linux linux_kernel: from 6.12 before 6.12.23; from 6.13 before 6.13.11; from 6.14 before 6.14.2

## Every score

- CISA-ADP: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/e50781bf7accc75883cb8a6a9921fb4e2fa8cca4> (patch)
- <https://git.kernel.org/stable/c/c1fb84e274cb6a2bce6ba5e65116c06e0b3ab275> (patch)
- <https://git.kernel.org/stable/c/645f1813fe0dc96381c36b834131e643b798fd73> (patch)
- <https://git.kernel.org/stable/c/7ba0847fa1c22e7801cebfe5f7b75aee4fae317e> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2025-22067 · Whole record: https://cve.day/CVE-2025-22067.json · Rebuilt by cve.day 2026-11-25T22:58:56.593Z
