Skip to content
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

32 Byte key derivation may fail with a 16 Byte ROT key #10516

Merged
merged 1 commit into from May 2, 2019

Conversation

Projects
None yet
8 participants
@yossi2le
Copy link
Contributor

commented Apr 30, 2019

Description

When trying to derive 32 bytes key with a 16 bytes ROT key the process may fail cause the ROT returned buffer size from kvstore has been ignored.

This bug fix is influencing PR #10493 (STM32F303RE: Activate FLASHIAP) because the device key test is failing on that PR.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@JanneKiiskila, @jeromecoutant

Release Notes

@yossi2le yossi2le force-pushed the yossi2le:yossi_fix_device_key_when_no_trng branch 2 times, most recently from 7bbb082 to bf37b8b Apr 30, 2019

@yossi2le yossi2le force-pushed the yossi2le:yossi_fix_device_key_when_no_trng branch from bf37b8b to f74d545 Apr 30, 2019

@yossi2le

This comment has been minimized.

Copy link
Contributor Author

commented Apr 30, 2019

@jeromecoutant, sorry to bother you but please take a look again cause I thought about it and find out the real correction is a bit different and therefore I have updated the file.

@ciarmcom ciarmcom requested review from JanneKiiskila and ARMmbed/mbed-os-maintainers Apr 30, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Apr 30, 2019

@davidsaada
Copy link
Contributor

left a comment

LGTM.

@adbridge adbridge added needs: CI and removed needs: review labels May 1, 2019

@adbridge

This comment has been minimized.

Copy link
Contributor

commented May 1, 2019

ci started

@mbed-ci

This comment has been minimized.

Copy link

commented May 1, 2019

Test run: SUCCESS

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

@JanneKiiskila

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

At least it now matches the function parameter defined in:

int TDBStore::reserved_data_get(void *reserved_data, size_t reserved_data_buf_size, size_t *actual_data_size)

Though I'm still wondering a bit which function it used before? Do we have an overloaded version somewhere, which does not have the last size_t *actual_size as parameter at all?

@yossi2le

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2019

The actual_size parameter has a default value of 0 and therefore no overload function is needed.
You can see it at the function declaration in the header file.

@JanneKiiskila

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

Found it now, yep makes sense.

@JanneKiiskila

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

@adbridge @0xc0170 - target to next patch release, please.

@0xc0170

0xc0170 approved these changes May 2, 2019

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels May 2, 2019

@0xc0170 0xc0170 merged commit d30d772 into ARMmbed:master May 2, 2019

26 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage Success
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8726 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8448B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
@0xc0170

This comment has been minimized.

Copy link
Member

commented May 2, 2019

This bug fix is influencing PR #10493 (STM32F303RE: Activate FLASHIAP) because the device key test is failing on that PR.

Also in , both will be in 5.12.3

@0xc0170 0xc0170 removed the ready for merge label May 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.