Skip to content

Commit ca740d4

Browse files
committed
ta: qcom_pas: authenticate images and bind them to peripheral and device
Wire the certificate chain, signature, and metadata-binding checks into the TA's INIT_IMAGE/AUTH_AND_RESET flow, so a firmware image's hash table is only trusted once its signer and binding to this peripheral and device are authenticated. authenticate_metadata() now, after parsing the hash segment: rejects a UIE-encrypted image (image decryption is not supported), verifies the metadata version, resolves the per-segment digest size (MBN v5 is always SHA-256; v6 selects SHA-256/SHA-384 from the metadata's root_cert_sel via the fuse PTA), validates the OEM (and, for double-signed images, QTI) certificate chain and signature against the device root of trust, authenticates hash-table entry 0 (the ELF header and program-header table), binds the metadata to this peripheral's SW_ID and to device-identity fields (OEM/MODEL/JTAG/serial/SoC version) via the fuse PTA, and enforces the PIL subsystem anti-rollback version floor. Serial-number binding engages when the metadata or the USE_SERIAL_NUM fuse requires it, or when the DEBUG, ROOT_REVOKE_ACTIVATE or UIE_KEY_SWITCH metadata option requests its serial-gated enable value; when engaged, a device with no fused serial fails the check rather than passing it. When multiple root certificates are provisioned, the image's root_cert_sel selects the anchoring root, gated by the device activation/revocation lists, and the root-of-trust digest covers all provisioned roots. The metadata-field bindings are validated before the image signature, and the signature digest is derived from the leaf certificate (RSA-PSS with SHA-256, ECDSA with SHA-384) while the root-of-trust binding stays SHA-384. Each binding check is enforced when secure boot is fused on and logged-and-tolerated otherwise, so unsigned-boot boards still come up. Enable CFG_QCOM_PAS_SECURE_BOOT by default on hoya-family platforms. Signed-off-by: Selvam Sathappan Periakaruppan <speriaka@qti.qualcomm.com> Assisted-by: Claude:claude-opus-4.8
1 parent b76ef0c commit ca740d4

4 files changed

Lines changed: 1085 additions & 11 deletions

File tree

core/arch/arm/plat-qcom/hoya/qcom-arch.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ CFG_NUM_THREADS ?= 8
1818
# OP-TEE re-verifies each loaded PIL firmware segment against the image's
1919
# hash table before releasing the peripheral from reset.
2020
CFG_QCOM_PAS_HASH_VERIFY ?= y
21+
22+
# Authenticate each image's certificate chain and signature, and bind it to
23+
# its peripheral and device, before trusting its hash table.
24+
CFG_QCOM_PAS_SECURE_BOOT ?= y

0 commit comments

Comments
 (0)