Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

esyr
Copy link
Contributor

@esyr esyr commented Sep 10, 2025

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

@esyr esyr requested a review from paulidale September 10, 2025 23:42
@esyr esyr added branch: master Merge to master branch approval: review pending This pull request needs review by a committer triaged: bug The issue/pr is/fixes a bug labels Sep 10, 2025
@esyr esyr force-pushed the esyr/coverity-fixes-20250911 branch from c1b7b84 to 915eb3d Compare September 10, 2025 23:45
@esyr esyr force-pushed the esyr/coverity-fixes-20250911 branch from 915eb3d to 849a14a Compare September 10, 2025 23:47
paulidale
paulidale previously approved these changes Sep 10, 2025
@paulidale paulidale added the branch: 3.6 Merge to openssl-3.6 label Sep 10, 2025
@paulidale
Copy link
Contributor

This needs to go to 3.6 too.

@github-actions github-actions bot added the severity: fips change The pull request changes FIPS provider sources label Sep 10, 2025
@esyr
Copy link
Contributor Author

esyr commented Sep 10, 2025

This needs to go to 3.6 too.

Does it? The offending commit is not in the openssl-3.6 branch, as far as I can see[1], maybe the relevant patch set[2] needs to be backported there as well then.

[1] https://github.com/openssl/openssl/commits/openssl-3.6/providers/implementations/macs/kmac_prov.c.in
[2] #28361

@paulidale
Copy link
Contributor

Ah, missed that bit.

@paulidale paulidale removed the branch: 3.6 Merge to openssl-3.6 label Sep 11, 2025
…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]>
Copy link
Contributor

@tom-cosgrove-arm tom-cosgrove-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

Copy link
Contributor

@Sashan Sashan left a 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.

@Sashan Sashan added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Sep 11, 2025
@t8m t8m added the tests: exempted The PR is exempt from requirements for testing label Sep 11, 2025
@openssl-machine openssl-machine removed the approval: done This pull request has the required number of approvals label Sep 12, 2025
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

@openssl-machine openssl-machine added the approval: ready to merge The 24 hour grace period has passed, ready to merge label Sep 12, 2025
@nhorman
Copy link
Contributor

nhorman commented Sep 12, 2025

merged to master, thank you!

@nhorman nhorman closed this Sep 12, 2025
openssl-machine pushed a commit that referenced this pull request Sep 12, 2025
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Merge to master branch severity: fips change The pull request changes FIPS provider sources tests: exempted The PR is exempt from requirements for testing triaged: bug The issue/pr is/fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Address Coverity issue 1453634
8 participants