Fix possible error code mangling in psa_mac_verify_finish #345

Merged
gilles-peskine-arm merged 1 commit from psa_mac_verify_finish-status into development 2020-02-03 07:55:12 -06:00
gilles-peskine-arm commented 2020-01-20 09:36:42 -06:00 (Migrated from github.com)

If psa_mac_finish_internal fails (which can only happen due to bad
parameters or hardware problem), the error code was converted to
PSA_ERROR_INVALID_SIGNATURE if the uninitialized stack variable
actual_mac happened to contain the expected MAC. This is a minor bug
but it may be possible to leverage it as part of a longer attack path
in some scenarios.

Reported externally. Found by static analysis.

If psa_mac_finish_internal fails (which can only happen due to bad parameters or hardware problem), the error code was converted to PSA_ERROR_INVALID_SIGNATURE if the uninitialized stack variable actual_mac happened to contain the expected MAC. This is a minor bug but it may be possible to leverage it as part of a longer attack path in some scenarios. Reported externally. Found by static analysis.
mpg (Migrated from github.com) approved these changes 2020-01-21 04:53:47 -06:00
mpg (Migrated from github.com) left a comment

Looks good to me.

Looks good to me.
mpg commented 2020-01-21 05:09:21 -06:00 (Migrated from github.com)

Looking at CI results in the pr-merge job, the only failures are with Mbed OS testing, which is expected as Mbed OS needs updating. All other tests pass, so this is as good as a pass.

Looking at CI results in the pr-merge job, the only failures are with Mbed OS testing, which is expected as Mbed OS needs updating. All other tests pass, so this is as good as a pass.
yanesca (Migrated from github.com) approved these changes 2020-02-03 07:53:19 -06:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-ARMmbed/mbed-crypto!345
No description provided.