Repository navigation
Match the const of X509V3_EXT_V2I in the alternative name methods (4.1.0) - #21
Merged
Algunenano merged 1 commit intoNov 23, 2026
Merged
Conversation
`v2i_subject_alt` and `v2i_issuer_alt` take a non-const `X509V3_EXT_METHOD *`, but `do_ext_nconf` calls them through `X509V3_EXT_V2I`, which takes a `const` one. Clang CFI with `-fsanitize-cfi-icall-generalize-pointers` treats pointer types alike but keeps the `const` of the pointee, so creating a subject alternative name extension with `X509V3_EXT_conf_nid` traps. Both functions only pass the method to `v2i_GENERAL_NAME`, which already takes it as `const`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
v2i_subject_altandv2i_issuer_alt(crypto/x509/v3_san.c) take a non-constX509V3_EXT_METHOD *, butdo_ext_nconfcalls them throughX509V3_EXT_V2I, whosemethodparameter isconst. ClickHouse builds OpenSSL with Clang CFI and-fsanitize-cfi-icall-generalize-pointers, which treats all pointer types alike but keeps theconstof the pointee, soX509V3_EXT_conf_nid(nullptr, nullptr, NID_subject_alt_name, ...)traps withSIGILL(seen when the ACME client builds its certificate signing request).Both functions only pass
methodon tov2i_GENERAL_NAME, which already takes it asconst. Upstream master still has the same signatures, and otherX509V3_EXT_METHODcallbacks have the same mismatch; this changes only the ones ClickHouse reaches.