U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] fpga: zynqpl: fix bitstream header scan length checks
@ 2026-10-20 13:49 Michal Simek
  2026-10-20 13:49 ` [PATCH 1/2] fpga: zynqpl: use actread for bitstream scan in zynq_loadfs Michal Simek
  2026-10-20 13:49 ` [PATCH 2/2] fpga: zynqpl: stop header scan once a full header can't fit Michal Simek
  0 siblings, 2 replies; 3+ messages in thread
From: Michal Simek @ 2026-10-20 13:49 UTC (permalink / raw)
  To: u-boot, git; +Cc: Siva Durga Prasad Paladugu, Suraj Kakade, Tom Rini

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(-)

---

-- 
2.43.0


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

end of thread, other threads:[~2026-10-20 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20 13:49 [PATCH 0/2] fpga: zynqpl: fix bitstream header scan length checks Michal Simek
2026-10-20 13:49 ` [PATCH 1/2] fpga: zynqpl: use actread for bitstream scan in zynq_loadfs Michal Simek
2026-10-20 13:49 ` [PATCH 2/2] fpga: zynqpl: stop header scan once a full header can't fit Michal Simek

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