fpga: bounds checks and input validation fixes
Status from this message: Applied to for-next
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v8 Latest3 patches 1 replyApplied
- v73 patches 2 repliesSuperseded
- v63 patches 2 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v5 | 3 patches | 1 reply | Superseded | |
| v4 | 3 patches | 2 replies | Superseded | |
| v2 | 3 patches | 1 reply | Superseded | |
| v1 | 3 patches | 5 replies | Superseded |
Patches in v8 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | fpga: dfl: add bounds check in dfh_get_param_size()drivers/ | +2 | 0 replies | |
| 2/3 | fpga: dfl-afu: validate DMA mapping length in afu_dma_map_region()drivers/ | +3 | 0 replies | |
| 3/3 | fpga: microchip-spi: fix zero header_size OOB read in mpf_ops_parse_header()drivers/ | +3 | 0 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Xu Yilun |
|---|---|
| Series | R-b |
| 1/3 | |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v8 0/3] fpga: bounds checks and input validation fixes
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(+)
Signature · 1 line
2.43.0