spi: ljca: validate the response length before copying the data

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Sep 25, 2026

Read the record on cve.org

Description

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

spi: ljca: validate the response length before copying the data

ljca_spi_read_write() only checks that the response from the adapter carries the packet header and a non-zero payload length before copying r_packet->len bytes from the response into the transfer buffer.

The payload length is taken from the packet the device sent back and is neither bounded by the number of bytes actually received nor by the size of the requested transfer: a misbehaving adapter can announce a payload larger than what it actually sent, and the memcpy then reads past the end of the 60-byte input buffer and writes past the end of the caller's transfer buffer.

Check that the response carries the full header before reading r_packet->len, then reject responses whose payload is not contained in the data received or is longer than the requested transfer.

ProductVersions
Linux Linuxcaee8e38da67a8991a60f1f67e6820a0063278c4 to before 35dfe02e19f3b30c2c2711bedd59cdf6046bae0a Affectedcaee8e38da67a8991a60f1f67e6820a0063278c4 to before 3c50eeaf05d5065b0970c1db0c1862a987a6445a Affectedcaee8e38da67a8991a60f1f67e6820a0063278c4 to before baea448d490090499cc49f35f10a8b8be85ab92f Affectedcaee8e38da67a8991a60f1f67e6820a0063278c4 to before 0fe4573c822c4c9152e2fd5269ab85410c9e458f Affected
Linux Linux6.7 Affectedbefore 6.7 Not Affected6.12.117 through 6.12.* Not Affected6.18.63 through 6.18.* Not Affected7.3.4 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

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.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.