Commit ca740d4
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.81 parent b76ef0c commit ca740d4
4 files changed
Lines changed: 1085 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments