Skip to content

Fix typo in openssl-sys build script #2375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

rushilmehra
Copy link
Contributor

@rushilmehra rushilmehra commented Feb 23, 2025

In older versions of boringssl (e.g. the one currently vendored in cloudflare/boring) SSL_select_next_proto doesn't properly handle the case where the supported ALPN list is empty, and it will segfault.

Offending line: https://github.com/google/boringssl/blob/44b3df6f03d85c901767250329c571db405122d5/src/ssl/ssl_lib.cc#L2221

@alex
Copy link
Collaborator

alex commented Feb 23, 2025

Surely the correct fix here is for cloudflare to bump the version of BoringSSL, not to make all callers carry workarounds?

@botovq
Copy link
Contributor

botovq commented Feb 23, 2025

This problem is better known as CVE-2024-5535

@rushilmehra
Copy link
Contributor Author

Surely the correct fix here is for cloudflare to bump the version of BoringSSL, not to make all callers carry workarounds?

We don't use rust-openssl. We use cloudflare/boring, I upstreamed this in case someone is using rust-openssl with an old enough boringssl commit. Feel free to decline the PR

@rushilmehra
Copy link
Contributor Author

I guess the philosophy is that bindings shouldn't compensate for bugs in the underlying C/C++ library? That makes sense, I can remove the alpn commit if so. Just lmk

@alex
Copy link
Collaborator

alex commented Feb 23, 2025 via email

@rushilmehra
Copy link
Contributor Author

i.e. no need to be this overly defensive? I'll remove the commit when back at my laptop

@rushilmehra rushilmehra changed the title Guard against empty alpn lists given to ssl:select_next_proto Fix typo in openssl-sys build script Feb 24, 2025
@alex alex merged commit acd312c into sfackler:master Feb 24, 2025
67 checks passed
@rushilmehra rushilmehra deleted the handle-empty-alpn branch February 24, 2025 02:51
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