cvelo
P4 · Info

spi: npcm-fiu: limit UMA data_size to the 16-byte staging buffer

  • CVE-2026-143405
  • EUVD-2026-145002

Summary

In the Linux kernel's npcm-fiu SPI controller driver, the UMA read and write helpers copy data through a 16-byte on-stack staging buffer, but the transfer length comes from the SPI MEM operation and is not bounded by the driver. An operation with a zero-byte address and more than 16 data bytes could overflow the buffer on the write path or read past it on the read path, corrupting the kernel stack. The fix rejects any transfer larger than the staging buffer with -EOPNOTSUPP so the SPI core falls back to the generic message path. The chunked manual write path is unaffected because it never exceeds the chunk size. The record does not list a CVSS score or CISA known-exploited status.

AI summary · verify against the vendor advisory

Description

In the Linux kernel, the following vulnerability has been resolved: spi: npcm-fiu: limit UMA data_size to the 16-byte staging buffer npcm_fiu_uma_read() and npcm_fiu_uma_write() use a 16-byte on-stack staging buffer (u32 data_reg[4]) and move data_size bytes to or from it. data_size comes straight from op->data.nbytes, which is supplied by the SPI MEM operation and is not bounded by the driver: npcm_fiu_exec_op() only validates op->addr.nbytes, and no adjust_op_size callback truncates the transfer to the controller FIFO size. A SPI MEM operation with addr.nbytes == 0 and data.nbytes > 16 therefore overflows data_reg[] on the kernel stack (write path) or reads past it (read path), corrupting the stack. Reject data_size larger than the staging buffer in both UMA helpers by returning -EOPNOTSUPP, so spi_mem falls back to the generic SPI message path. The chunked path in npcm_fiu_manualwrite() always passes at most CHUNK_SIZE bytes, so it is unaffected.

Text from the CVE.org record.

Recommendation

No source states a fixed version. Check the vendor advisory.

Affected

  • Linux

    Affected versionsFixed in
    5.4none stated
    before 5.4: not affectednone stated
    from 5.10.275 up to 5.10.*: not affectednone stated
    from 5.15.226 up to 5.15.*: not affectednone stated
    from 6.1.193 up to 6.1.*: not affectednone stated
    from 6.6.163 up to 6.6.*: not affectednone stated
    from 6.12.117 up to 6.12.*: not affectednone stated
    from 6.18.63 up to 6.18.*: not affectednone stated

    and 2 more

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.