Destroying a persistent key open through multiple handles does not invalidate other handles #214
Labels
No labels
api-spec
bug
CLA requested
CLA valid
compliance
DO NOT MERGE
duplicate
enhancement
feature branch
good first issue
HEADER FORMATTING ISSUE
help wanted
Information
invalid
Jira status: AWAITING REVIEW
Jira status: CLOSED
Jira status: DONE
Jira status: IN PROGRESS
Jira status: IN REVIEW
Jira status: OPEN
Jira status: REOPENED
Jira status: RESOLVED
mirrored
mirror internally
needs: backports
needs: ci
needs: design review
needs: preceding PR
needs: review
needs: work
notabug
open for community contribution
Product Backlog
question
ready for merge
security
stale
type: bug
type: enhancement
type: question
web pages
wontfix
writing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-ARMmbed/mbed-crypto#214
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Consider the following sequence of operations (assume nothing fails):
Initially, there is a key with the identifier 3, and we take two handles to the same key. The first call to
psa_destroy_keywipes the key slot forhandle1and wipes the key in storage, but does not invalidate the key slot forhandle2. This results in several undesirable behaviors.handle2, because Mbed Crypto maintains an independent copy of the key in each slot. This means thatpsa_destroy_keyfailed to deliver its promise of wiping the key material, making the key unusable.handle2. But the key has been wiped from the secure element, so attempting to use it will either fail or trigger an operation with some other key (which may even be of a different type, leading to interesting cryptographic information leaks) depending on whether the slot number in the secure element has been reused.psa_destroy_keyonhandle2, this destroys a key in storage which is not the key thathandle2references.This is somewhat related to #86 which is about multipart operations retaining key material of a destroyed key.
Issue request type
Internal Jira reference: https://jira.arm.com/browse/IOTCRYPT-866