In the Linux kernel, the following vulnerability has been resolved:
spi: cadence: Fix out-of-bounds array access in cdnsmrvlxspisetupclock()
If requestedclk > 128, cdnsmrvlxspisetupclock() iterates over the entire cdnsmrvlxspiclkdivlist 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: cdnsmrvlxspisetupclock: unexpected end of section .text.cdnsmrvlxspisetupclock