Open katgiadla opened 1 month ago
Does not seem to be network related so re-assigning. PSA mentioned, so @tomi-font can you take a look at this?
@valeriosetti touched this, so passing the hot potato to him.
Curious to know, @katgiadla how did you come up with the "probably introduced by" commit?
Curious to know, @katgiadla how did you come up with the "probably introduced by" commit?
I've used bisection to get probably reason of the bug. It is important to confirm, if the marked commit is real cause of the bug.
I still haven't found a solution for this, but my suspects are that builds with TF-M does not fully support RSA signature. I need to investigate further.
I checked that:
west build -p always -b nrf9160dk/nrf9160 --test tests/subsys/jwt/libraries.encoding.jwt.rsa.psa
is OKwest build -p always -b nrf9160dk/nrf9160/ns --test tests/subsys/jwt/libraries.encoding.jwt.rsa.psa
FAILSIn both cases I tested on a real device flashing it with west flash --runner nrfutil
and then looking at the console.
The only difference between the 2 devices is that the 1st one does not have TF-M, while the 2nd one yes.
The same issue happens also if I replace the NRF9160 board with a mps2/an521/cpu0
one (this is another board that has both the TF-M and non-TF-M images available in Zephyr) and I can test it with QEMU.
After digging a bit more on this issue, it turned out to be a TF-M limitation: it did not allocate enough heap memory to the crypto partition in order to allow RSA 2048-bit signatures. This should be fixed by #81869
@katgiadla once #81869 has CI green (a part from the dnm
label, of course), can you please:
west update
Edit: I tried the PR locally on a nrf9160dk board with
twister -c -p nrf9160dk/nrf9160/ns -T tests/subsys/jwt --device-testing --device-serial /dev/ttyACM0 -v --inline-logs --west-flash="--erase" --west-runner nrfutil
and it worked just fine.
Describe the bug The test
tests/subsys/jwt/libraries.encoding.jwt.rsa.psa
failsObserved for:
nrf5340dk/nrf5340/cpuapp/ns
nrf9160dk/nrf9160/ns
To Reproduce Steps to reproduce the behavior:
nrf9160dk/nrf9160/ns
connected./scripts/twister -T tests/subsys/jwt -p nrf9160dk/nrf9160/ns --device-testing --device-serial /dev/ttyACM0 -v --inline-logs --west-flash="--erase"
Expected behavior Valid console output
Impact Not clear
Logs and console output
Environment (please complete the following information):
v3.7.0-4232-g9b5260de9a31
Additional context Probably introduced by 29e82d2f23b099ead21a045a869818e24552de87