All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/1] hw/misc/aspeed_sbc: Add bounds checking for OTP write operations
@ 2026-04-28  5:52 Kane Chen
  2026-04-28  5:52 ` [PATCH v1 1/1] " Kane Chen
  0 siblings, 1 reply; 10+ messages in thread
From: Kane Chen @ 2026-04-28  5:52 UTC (permalink / raw)
  To: Cédric Le Goater, Peter Maydell, Steven Lee, Troy Lee,
	Jamin Lin, Andrew Jeffery, Joel Stanley, open list:ASPEED BMCs,
	open list:All patches CC here
  Cc: Troy Lee, Kane Chen

This series fixes a bounds issue in Aspeed OTP programming through the
Secure Boot Controller path.

The guest-provided OTP address is word-indexed in the SBC model, but
the OTP device write path operates on byte offsets. Passing the value
through without validation/conversion could lead to out-of-range writes.

The patch adds bounds checking in aspeed_sbc_otp_prog() before
converting the address to a byte offset, and aligns the OTP write
helper interfaces with byte-offset semantics.

The patch has been validated by a functional test and by the boundary
test documented at:
https://gitlab.com/qemu-project/qemu/-/work_items/3436

Kane-Chen-AS (1):
  hw/misc/aspeed_sbc: Add bounds checking for OTP write operations

 hw/misc/aspeed_sbc.c  | 14 +++++++++++---
 hw/nvram/aspeed_otp.c | 13 ++++++-------
 2 files changed, 17 insertions(+), 10 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-05-14 18:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28  5:52 [PATCH v1 0/1] hw/misc/aspeed_sbc: Add bounds checking for OTP write operations Kane Chen
2026-04-28  5:52 ` [PATCH v1 1/1] " Kane Chen
2026-04-30 11:03   ` Peter Maydell
2026-04-30 13:48     ` 回覆: " Kane Chen
2026-04-30 17:56     ` Cédric Le Goater
2026-05-04  5:56       ` Kane Chen
2026-04-30 17:26   ` Cédric Le Goater
2026-04-30 17:47     ` Peter Maydell
2026-04-30 17:54       ` Cédric Le Goater
2026-05-14 18:48   ` Michael Tokarev

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.