Repository navigation
Clear a NULL cert_cb back to the empty variant (fixes #537) - #538
Closed
dorianverlaine wants to merge 1 commit into
Closed
dorianverlaine wants to merge 1 commit into
dorianverlaine wants to merge 1 commit into
Conversation
The BoringSSL revision in 5.3.0 (427ec40c) stores a null cert_cb as an `OldCallback` alternative instead of resetting the variant to `monostate`, so `CertCb::operator bool()` reports a cleared callback as present and `do_cert_callback` invokes a null function pointer (cloudflare#537). That breaks the established "set NULL to clear" behavior that the resumable accept in pingora relies on and crashes any handshake that resumes after the callback was cleared. Carry the upstream fix as a `boring-sys/patches/` entry so 5.3.x users are not blocked while it makes its way into BoringSSL, and add a regression test that arms and then clears the callback before a handshake; without the patch the test process dies with SIGSEGV, with it the handshake completes.
Author
|
Withdrawing this report and the accompanying patch. We can reproduce the behavior consistently, but from the available documentation and upstream discussion we cannot determine whether the |
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.
Fixes #537.
This carries the BoringSSL fix as a
boring-sys/patches/entry so 5.3.x users have an escape hatch while the change makes its way into BoringSSL, and adds a regression test that reproduces the crash on unpatched 5.3.0.The change
boring-sys/patches/cert-cb-clear.patchresetscert_cb.cbtostd::monostatewhenNULLis passed tossl_cert_set_cert_cb(both overloads), restoring the previous "NULL clears" behavior.boring-sys/build/main.rsapplies the patch unconditionally, next to the post-quantum patch.boring/src/ssl/test/cert_cb_clear.rsarms a blocking certificate callback and clears it right before the handshake — the same sequence a resumable accept uses to unblock a paused handshake.Verification
SIGSEGV: invalid memory reference; with the patch, the handshake completes and the fullboringlib suite passes (300 passed, 0 failed, 1 ignored).cargo fmt --all -- --checkandcargo clippy --all --all-targets --features rpk,prf,mlkem,mldsaare clean locally.Happy to rework if you would rather land the fix upstream first and pick it up with the next revision bump.