fpga: zynqpl: fix bitstream header scan length checks
Status from this message: Applied.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | fpga: zynqpl: use actread for bitstream scan in zynq_loadfsdrivers/ | +1 | 0 replies | |
| 2/2 | fpga: zynqpl: stop header scan once a full header can't fitdrivers/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] fpga: zynqpl: fix bitstream header scan length checks
Hi,
This series fixes bitstream header scan length checks in check_data(), reachable from fpga load and fpga loadfs.
Patch 1 stops the bitstream header scan once there's no longer enough room left for a full header. The old scan kept checking positions near the end of the buffer that could never hold a complete header, and a match there caused an unbounded header read to go past the buffer end.
Patch 2 fixes zynq_loadfs() passing blocksize into zynq_validate_bitstream() after fs_read(), even when actread was smaller. Pass actread so the scan length matches the bytes actually written into the buffer.
Thanks,
Michal
Suraj Kakade (2):
fpga: zynqpl: use actread for bitstream scan in zynq_loadfs
fpga: zynqpl: stop header scan once a full header can't fit
drivers/fpga/zynqpl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
---
Signature · 1 line
2.43.0