hw/misc/aspeed_sbc: Add bounds checking for OTP write operations
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | hw/misc/aspeed_sbc: Add bounds checking for OTP write operationshw/ hw/ | +17 | 10 replies |
Reviews trailers per patch
The patch has a Reviewed-by or Acked-by.
| Patch | Peter Maydell |
|---|---|
| 1/1 | R-b R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v1 0/1] hw/misc/aspeed_sbc: Add bounds checking for OTP write operations
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(-)
Signature · 1 line
2.43.0