Hi Chris,

 

Thanks for reporting this issue. I will take care of it.

 

Best regards,

Hu Ziji

 

From: TF-M <tf-m-bounces@lists.trustedfirmware.org> On Behalf Of chris.brand--- via TF-M
Sent: Saturday, October 16, 2021 5:47 AM
To: tf-m@lists.trustedfirmware.org
Subject: [TF-M] PSA Arch attestation test failure

 

Hi,

 

We’re seeing a failure in the PSA Arch attestation test, specifically:

TEST: 601 | DESCRIPTION: Testing attestation initial attestation APIs | UT: psa_initial_attestation

[Info] Executing tests from non-secure

[Check 1] Test psa_initial_attestation_get_token with Challenge 32

[Check 2] Test psa_initial_attestation_get_token with Challenge 48

        Failed at Checkpoint: 1

        Actual: -138

        Expected: 0

 

TEST RESULT: FAILED (Error Code=0x1)

 

The failure is seen on PSoC, but only the gcc Release build (armclang and the other three gcc builds are all fine. Haven’t tested IAR), which makes it tricky to debug. PSoC uses the common attest HAL code, though, so I imagine the issue may also be present on other platforms.

 

Bisecting the problem leads to commit 09d71ffd40368b978d428744ad7ba0d3963f8d1d (“Platform: Use OTP as backing for attestation data”).

 

-138 is PSA_ERROR_BUFFER_TOO_SMALL.

 

I’m running gcc-arm-none-eabi-7-2018-q2-update, in case that matters.

 

Chris Brand

 

Cypress Semiconductor (Canada), Inc.

Sr Prin Software Engr

CSCA CSS ICW SW PSW 1

Office: +1 778 234 0515

Chris.Brand@infineon.com