-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
kmac_prov.c.in: avoid resource leak on kmac_new_decoder fail in kmac_fetch_new #28516
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
Conversation
c1b7b84
to
915eb3d
Compare
915eb3d
to
849a14a
Compare
This needs to go to 3.6 too. |
Does it? The offending commit is not in the [1] https://github.com/openssl/openssl/commits/openssl-3.6/providers/implementations/macs/kmac_prov.c.in |
Ah, missed that bit. |
…fetch_new kctx was not freed in a case of kmac_new_decoder failure; consolidate all the error paths under the "err:" label and jump to it on kmac_new_decoder() returning 0. Fixes: d5efc85 "kmac: avoid using ossl_prov_digest_load_from_params()" Resolves: openssl/project#1419 Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1453634 Signed-off-by: Eugene Syromiatnikov <[email protected]>
849a14a
to
80d33f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me. thanks.
This pull request is ready to merge |
merged to master, thank you! |
…fetch_new kctx was not freed in a case of kmac_new_decoder failure; consolidate all the error paths under the "err:" label and jump to it on kmac_new_decoder() returning 0. Fixes: d5efc85 "kmac: avoid using ossl_prov_digest_load_from_params()" Resolves: openssl/project#1419 Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1453634 Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Saša Nedvědický <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Tom Cosgrove <[email protected]> Reviewed-by: Neil Horman <[email protected]> (Merged from #28516)
kctx was not freed in a case of kmac_new_decoder failure; consolidate all the error paths under the "err:" label and jump to it on kmac_new_decoder() returning 0.
Fixes: d5efc85 "kmac: avoid using ossl_prov_digest_load_from_params()"
Resolves: openssl/project#1419