Skip to content

Fix psa_key_management_operations #12392

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

Merged
merged 1 commit into from
Feb 12, 2020
Merged

Conversation

GaborAbonyi
Copy link
Contributor

Summary of changes

Fix psa_key_management_operations for PSA_GET_KEY_ATTRIBUTES and PSA_IMPORT_KEY.
At these locations, psa_key_attribute variables are used without initialisation.
The function getting it (psa_get_key_attributes), is freeing attributes->domain_parameters, which can contain random address from the stack.

Impact of changes

Fix of intermittent errors.

Migration actions required

Documentation

N/A

Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


At these locations, psa_key_attribute variables are used without
initialisation. The function getting it (psa_get_key_attributes),
is freeing attributes->domain_parameters, which can contain random
address from the stack.

Signed-off-by: Gabor Abonyi <[email protected]>
@ciarmcom ciarmcom requested a review from a team February 7, 2020 16:00
@ciarmcom
Copy link
Member

ciarmcom commented Feb 7, 2020

@GaborAbonyi, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

Copy link
Member

@bulislaw bulislaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Patater please review

@mergify mergify bot added needs: CI and removed needs: review labels Feb 10, 2020
@0xc0170 0xc0170 requested a review from a team February 10, 2020 15:50
@0xc0170 0xc0170 added the release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0 label Feb 10, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 10, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Feb 10, 2020

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@mergify mergify bot added needs: work and removed needs: CI labels Feb 10, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 11, 2020

I restarted tests to confirm the failures. @GaborAbonyi please review artifacts above (Build artifacts url reference) to find test failures.

@GaborAbonyi
Copy link
Contributor Author

GaborAbonyi commented Feb 11, 2020

Thanks @0xc0170 . I checked the artifacts but not sure what causes the issue, as it is only present for one target, with one specific compiler. It is possible that there is another uninitialized variable case that is now surfaced.
Let's hope, the rerun passes, if not I try to debug it on the failing LPC55S69 target.

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 12, 2020

Second run all good.

@0xc0170 0xc0170 merged commit bde0f56 into ARMmbed:master Feb 12, 2020
@GaborAbonyi GaborAbonyi deleted the psa_crypto_fix branch February 12, 2020 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants