Skip to content

Check len against buffers size upper bound in PSA tests #259

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

Conversation

k-stachowiak
Copy link
Contributor

In asn1_skip_integer(), in test_suite_psa_crypto.function suite, a buffer is accessed at an index based on len - taken from itself. There is a lower bound check done on the len value, but none for the upper bound.

This PR adds the upper bound check for the value used for the lookup.

@k-stachowiak k-stachowiak added enhancement New feature or request needs: review The pull request is ready for review. This generally means that it has no known issues. labels Sep 20, 2019
@Patater Patater removed the needs: review The pull request is ready for review. This generally means that it has no known issues. label Oct 9, 2019
@gilles-peskine-arm
Copy link
Collaborator

The test failures are unrelated and don't obscure coverage of the changes in this PR. Good to merge.

@gilles-peskine-arm gilles-peskine-arm merged commit ccde952 into ARMmbed:development Oct 29, 2019
gilles-peskine-arm added a commit to gilles-peskine-arm/mbed-crypto that referenced this pull request Nov 15, 2019
* ARMmbed#292: Make psa_close_key(0) and psa_destroy_key(0) succeed
* ARMmbed#299: Allow xxx_drbg_set_entropy_len before xxx_drbg_seed
* ARMmbed#259: Check `len` against buffers size upper bound in PSA tests
* ARMmbed#288: Add ECDSA tests with hash and key of different lengths
* ARMmbed#305: CTR_DRBG: grab a nonce from the entropy source if needed
* ARMmbed#316: Stop transactions from being reentrant
* ARMmbed#317: getting_started: Make it clear that keys are passed in
* ARMmbed#314: Fix pk_write with EC key to use a constant size for the private value
* ARMmbed#298: Test a build without any asymmetric cryptography
* ARMmbed#284: Fix some possibly-undefined variable warnings
* ARMmbed#315: Define MBEDTLS_PK_SIGNATURE_MAX_SIZE
* ARMmbed#318: Finish side-porting commits from mbedtls-restricted that missed the split
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants