All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: <u-boot@lists.u-boot-project.org>, <git@amd.com>
Cc: Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>,
	"Suraj Kakade" <suraj.hanumantkakade@amd.com>,
	Tom Rini <trini@konsulko.com>
Subject: [PATCH 0/2] fpga: zynqpl: fix bitstream header scan length checks
Date: Tue, 20 Oct 2026 15:49:05 +0200	[thread overview]
Message-ID: <cover.1792504143.git.michal.simek@amd.com> (raw)

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


             reply	other threads:[~2026-10-20 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20 13:49 Michal Simek [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1792504143.git.michal.simek@amd.com \
    --to=michal.simek@amd.com \
    --cc=git@amd.com \
    --cc=siva.durga.prasad.paladugu@amd.com \
    --cc=suraj.hanumantkakade@amd.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.