Backport genm fixes in case USE_LIBCMP - #125
Merged
Merged
Conversation
DDvO
force-pushed
the
backport_genm_fixes
branch
from
July 21, 2026 16:43
23c2330 to
e591559
Compare
DDvO
force-pushed
the
backport_genm_fixes
branch
2 times, most recently
from
July 21, 2026 19:44
cca0274 to
66ed63f
Compare
DDvO
force-pushed
the
backport_genm_fixes
branch
2 times, most recently
from
July 21, 2026 20:39
f385e48 to
bf4efaa
Compare
This correctly uses an existing trust anchor certificate as the root of the chain to validate. While we are here, we add some explaining comments to selfsigned_verify_cb() and enable support for not self-signed trusted certs (usually oldWithOld or newWithNew). For consistency with OpenSSL, also rename verify_cert1() as verify_ss_cert_trans() and replace "!X509_up_ref(...) || !sk_X509_push(chain, ...))" by "!X509_add_cert(chain, ..., X509_ADD_FLAG_UP_REF)"
DDvO
force-pushed
the
backport_genm_fixes
branch
from
July 21, 2026 20:57
bf4efaa to
e0bd00b
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This backports a couple of fixes already done at OpenSSL level,
relevant only if
USE_LIBCMPis set and used with older OpenSSL versions.BTW, note that the related CVE-2026-42769, which was re-reported to us by TheSecguy (Owais Lone), is not really a security issue:
the bug can lead to constructing an unsuitable chain of certificates, which will then cause chain validation failure, but not wrong acceptance of an illicit trust anchor certificate.
So part of the analysis given in the CVE is wrong - the bug did not really cause a vulnerability.