Skip to content

hw/misc/aspeed_sbc: Add bounds checking for OTP write operations

Kane Chen qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1hw/misc/aspeed_sbc: Add bounds checking for OTP write operationshw/misc/aspeed_sbc.c hw/nvram/aspeed_otp.c+17 -1010 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchPeter Maydell
1/1R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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