Linux FPGA development
 help / color / mirror / Atom feed
* [PATCH v6 0/3] fpga: bounds checks and input validation fixes
@ 2026-05-12 13:07 Sebastian Alba Vives
  2026-05-12 13:07 ` [PATCH v6 1/3] fpga: dfl: add bounds check in dfh_get_param_size() Sebastian Alba Vives
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sebastian Alba Vives @ 2026-05-12 13:07 UTC (permalink / raw)
  To: yilun.xu, gregkh
  Cc: linux-fpga, conor.dooley, mdf, linux-kernel, stable,
	Sebastian Alba Vives

This series adds three defensive fixes to FPGA drivers:

Patch 1/3 fixes dfh_get_param_size() in the DFL driver where the loop
bounds check is evaluated before incrementing size, potentially returning
an inflated size that exceeds the feature region boundary.

Patch 2/3 validates the DMA mapping length in afu_ioctl_dma_map() at the
ioctl entry point before passing it down the call chain, preventing
implicit integer truncation in pin_user_pages_fast().

Patch 3/3 fixes mpf_ops_parse_header() in the Microchip SPI FPGA manager
where a zero header_size from the bitstream causes a one-byte read before
the buffer start.

Sebastian Alba Vives (3):
  fpga: dfl: add bounds check in dfh_get_param_size()
  fpga: dfl-afu: validate DMA mapping length in afu_dma_map_region()
  fpga: microchip-spi: fix zero header_size OOB read in
    mpf_ops_parse_header()

 drivers/fpga/dfl-afu-main.c  | 3 +++
 drivers/fpga/dfl.c           | 2 ++
 drivers/fpga/microchip-spi.c | 3 +++
 3 files changed, 8 insertions(+)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-12 13:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 13:07 [PATCH v6 0/3] fpga: bounds checks and input validation fixes Sebastian Alba Vives
2026-05-12 13:07 ` [PATCH v6 1/3] fpga: dfl: add bounds check in dfh_get_param_size() Sebastian Alba Vives
2026-05-12 13:07 ` [PATCH v6 2/3] fpga: dfl-afu: validate DMA mapping length in afu_dma_map_region() Sebastian Alba Vives
2026-05-12 13:07 ` [PATCH v6 3/3] fpga: microchip-spi: fix zero header_size OOB read in mpf_ops_parse_header() Sebastian Alba Vives

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox