-
Notifications
You must be signed in to change notification settings - Fork 60
Fix crash in compliance tests #495
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
Open
gilles-peskine-arm
wants to merge
7
commits into
Mbed-TLS:development
Choose a base branch
from
gilles-peskine-arm:compliance-split-cleanup-crypto
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix crash in compliance tests #495
gilles-peskine-arm
wants to merge
7
commits into
Mbed-TLS:development
from
gilles-peskine-arm:compliance-split-cleanup-crypto
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
Without this patch, psa-arch-tests crashes on some platforms including our CI environment because libc detects a buffer overflow on the stack. This bug does not seem to be fixed upstream yet, so I will submit a fix. In the meantime, we'll need to carry the patch here. Signed-off-by: Gilles Peskine <[email protected]>
We don't implement `psa_key_derivation_verify_bytes()` and `psa_key_derivation_verify_key()` yet (the functions exist but they always return `PSA_ERROR_NOT_SUPPORTED`). Therefore, expect the tests for these functions to fail. These failures were previously undetected because psa-arch-tests was crashing due to a stack buffer overflow in AEAD tests. Signed-off-by: Gilles Peskine <[email protected]>
Partial backport of 232fb5801273dbc97789cb9079f1168499e34a2a, first released in v25.08_API1.9_ADAC_1.0.2 . Signed-off-by: Gilles Peskine <[email protected]>
There are memory errors in some PAKE tests that make psa-arch-tests crash. I am preparing patches for them, but until then, disable PAKE. Signed-off-by: Gilles Peskine <[email protected]>
3 tasks
mpg
requested changes
Oct 6, 2025
Contributor
mpg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except for an issue in a docstring.
Signed-off-by: Gilles Peskine <[email protected]>
mpg
approved these changes
Oct 7, 2025
Contributor
mpg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
needs-preceding-pr
Requires another PR to be merged first
needs-review
Every commit must be reviewed by at least two team members
needs-reviewer
This PR needs someone to pick it up for review
priority-high
High priority - will be reviewed soon
size-xs
Estimated task size: extra small (a few hours at most)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the PSA compliance tests, patch a memory error in
psa-arch-teststhat causes it to crash on environments such as our CI. This has been happening since #453; I realized the problem just after it was merged.I have a patch to fix the fact that out script doesn't detect the crash, but before we can merge it in the framework, we need to fix crypto so that it doesn't crash. In the meantime, we can check visually that psa-arch-tests ran until the end: in the log, the output ends with “Crypto suite report” with pass/fail/skip counts and
Entering standby...To keep the patching minimal, I only fix one set of memory errors. There are other errors that cause crashes in JPAKE tests, and more that don't cause a crash on our CI environment or my machine. I will upstream my fixes (at least some of them are not patched upstream), but in the meantime, we'll have to live with patches.
Since JPAKE is crashing and is currently not compliant anyway, disable it for now. We'll reenable it later, when we start fixing the JPAKE compliance issues.
Needs preceding PR: for a bug fix when there are expected failures.
PR checklist