CVE-2025-22067

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

State
Published
Severity
7.8 High
Published
Apr 16, 2025
Updated
May 11, 2026
Reserved
Dec 29, 2024

Read the record on cve.org

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

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HCISA-ADP

Weaknesses

  • CWE-129 Improper Validation of Array Index

Affected Products

ProductVersions
LinuxLinux
  • 26d34fdc49712ddbd42b11102f5d9d78a0f42097 to before e50781bf7accc75883cb8a6a9921fb4e2fa8cca4Affected
  • 26d34fdc49712ddbd42b11102f5d9d78a0f42097 to before c1fb84e274cb6a2bce6ba5e65116c06e0b3ab275Affected
  • 26d34fdc49712ddbd42b11102f5d9d78a0f42097 to before 645f1813fe0dc96381c36b834131e643b798fd73Affected
  • 26d34fdc49712ddbd42b11102f5d9d78a0f42097 to before 7ba0847fa1c22e7801cebfe5f7b75aee4fae317eAffected
LinuxLinux
  • 6.12Affected
  • before 6.12Not affected
  • 6.12.23 through 6.12.*Not affected
  • 6.13.11 through 6.13.*Not affected
  • 6.14.2 through 6.14.*Not affected
  • 6.15 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.