-
Notifications
You must be signed in to change notification settings - Fork 7.3k
mbedTLS ITS is not thread safe #59362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@PavelVPV have you seen this? |
@jgl-meta this is I guess issue with mbedTLS, not with Bluetooth mesh. As an mbedTLS user I can't use different filenames for ITS in mbedTLS. |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
I removed If mbedtls PSA is going to be the main security library in Zephyr then it should be compatible with Zephyr's code base including tests approaches. |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
Describe the bug
mbedTLS has PSA ITS (Internal Trusted Storage) implementation that is based on posix file API. It doesn't consider ability to run multiple processes\treads with mbedTLS instances. As a consequence, all instances compete for the single file that reproduces ITS functionality.
It impacts on BLE mesh tests behavior. All mesh bsim tests are run in parallel environment. Tests those check mesh functionality related to storing\restoring\usage keys with
PSA_KEY_LIFETIME_PERSISTENT
fail.Tests pass successfully if disable parallel environment.
Finally, it causes the situation when it is not possible to run bsim tests for mesh with PSA in Zephyr CI.
To Reproduce
Steps to reproduce the behavior:
All steps and links how to deploy bsim environment is possible to find in Zephyr documentation
If remove parallel environment, all tests pass
Expected behavior
All tests should pass without errors in parallel environment
Impact
Impossible to add ble mesh bsim tests with mbedTLS PSA crypto in Zephyr's CI
Environment (please complete the following information):
Additional context
Alternative solution to fix the issue is implementation PSA ITS based on Zephyr's settings subsystem. If mbedTLS supports ITS based on settings, then each simulated device will include itself its own flash area. There is no competition for the common source.
The text was updated successfully, but these errors were encountered: