From: Kane Chen <kane_chen@aspeedtech.com>
To: "Cédric Le Goater" <clg@kaod.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Steven Lee" <steven_lee@aspeedtech.com>,
"Troy Lee" <leetroy@gmail.com>,
"Jamin Lin" <jamin_lin@aspeedtech.com>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Joel Stanley" <joel@jms.id.au>,
"open list:ASPEED BMCs" <qemu-arm@nongnu.org>,
"open list:All patches CC here" <qemu-devel@nongnu.org>
Cc: Troy Lee <troy_lee@aspeedtech.com>, Kane Chen <kane_chen@aspeedtech.com>
Subject: [PATCH v1 0/1] hw/misc/aspeed_sbc: Add bounds checking for OTP write operations
Date: Tue, 28 Apr 2026 05:52:55 +0000 [thread overview]
Message-ID: <20260428055254.76581-1-kane_chen@aspeedtech.com> (raw)
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
next reply other threads:[~2026-04-28 5:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 5:52 Kane Chen [this message]
2026-04-28 5:52 ` [PATCH v1 1/1] hw/misc/aspeed_sbc: Add bounds checking for OTP write operations 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
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=20260428055254.76581-1-kane_chen@aspeedtech.com \
--to=kane_chen@aspeedtech.com \
--cc=andrew@codeconstruct.com.au \
--cc=clg@kaod.org \
--cc=jamin_lin@aspeedtech.com \
--cc=joel@jms.id.au \
--cc=leetroy@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=steven_lee@aspeedtech.com \
--cc=troy_lee@aspeedtech.com \
/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.