Skip to content

Proper recovery if creating a key in a secure element fails #217

Closed as not planned
@gilles-peskine-arm

Description

@gilles-peskine-arm

Description

When creating a key in a secure element, if the call to the secure element's create method succeeds, but an error happens later (e.g. saving the driver's persistent data to storage), the API function reports a failure, but the key remains in the secure element. This is a resource leak and can be a data leak (when importing a key).

There may be other key creation errors that are not handled properly. This should be reviewed and tested.

Issue request type

[ ] Question
[ ] Enhancement
[x] Bug

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions