Skip to content

Backport genm fixes in case USE_LIBCMP - #125

Merged
DDvO merged 3 commits into
masterfrom
backport_genm_fixes
Jul 23, 2026
Merged

Backport genm fixes in case USE_LIBCMP#125
DDvO merged 3 commits into
masterfrom
backport_genm_fixes

Conversation

@DDvO

@DDvO DDvO commented Jul 21, 2026

Copy link
Copy Markdown
Member

This backports a couple of fixes already done at OpenSSL level,
relevant only if USE_LIBCMP is 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.

This comment was marked as outdated.

@DDvO
DDvO force-pushed the backport_genm_fixes branch from 23c2330 to e591559 Compare July 21, 2026 16:43
@DDvO
DDvO force-pushed the backport_genm_fixes branch 2 times, most recently from cca0274 to 66ed63f Compare July 21, 2026 19:44
@DDvO DDvO changed the title Backport genm fixes Backport genm fixes in case USE_LIBCMP Jul 21, 2026
@DDvO
DDvO force-pushed the backport_genm_fixes branch 2 times, most recently from f385e48 to bf4efaa Compare July 21, 2026 20:39
@DDvO
DDvO requested a review from Copilot July 21, 2026 20:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread src/genericCMPClient.c
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
DDvO force-pushed the backport_genm_fixes branch from bf4efaa to e0bd00b Compare July 21, 2026 20:57
@sonarqubecloud

Copy link
Copy Markdown

@rajeev-0 rajeev-0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@DDvO
DDvO merged commit 7fe44bb into master Jul 23, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants