Skip to content

provider_util.c fails to handle ENGINE references correctly #16845

@mattcaswell

Description

@mattcaswell

It is possible to pass an ENGINE name to certain cipher and digest related functions. The file provider_util.c is supposed to handle creating and managing ENGINE references as required.

However, ossl_prov_cipher_reset and ossl_prov_digest_reset will leak any engine references associated with the cipher/digest leading to memory leaks. Additionally ossl_prov_cipher_copy and ossl_prov_digest_copy fail to copy engine references correctly which would lead to double frees (if it wasn't for the fact that the "reset" functions leaked them anyway).

Metadata

Metadata

Assignees

No one assigned

    Labels

    branch: 3.0Applies to openssl-3.0 branchbranch: masterApplies to master branchtriaged: bugThe issue/pr is/fixes a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions