Skip to content
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

Update OpenSSL #8956

Merged
merged 13 commits into from Feb 27, 2020
Merged

Update OpenSSL #8956

merged 13 commits into from Feb 27, 2020

Conversation

alexey-milovidov
Copy link
Member

@alexey-milovidov alexey-milovidov commented Feb 2, 2020

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Update OpenSSL to upstream master. Fixed the issue when TLS connections may fail with the message OpenSSL SSL_read: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error and SSL Exception: error:2400006E:random number generator::error retrieving entropy. The issue was present in version 20.1.

Detailed description:
OpenSSL is using getrandom method on newer kernels and /dev/random on old kernels. The function getrandom from libc is linked if it is present and it compromises the portability of the built binary. If we just disable the getrandom method in configuration, OpenSSL will fallback to /dev/random which is also considered Ok. But in fact, on newer Linux kernels, /dev/random cannot provide sufficient amount of entropy (while getrandom guarantee to succeed). To fix this issue while maintaining portability, we refer getrandom not while static link stage but with dynamic symbol lookup (this method is also supported by OpenSSL). See the following patch: https://github.com/ClickHouse-Extras/openssl/pull/2/files

@filimonov
Copy link
Contributor

filimonov commented Feb 3, 2020

Can we downgrade to 1.1.1 stable instead and wait for official 3.0.0 release (it's not even a beta yet)

https://www.openssl.org/blog/blog/2019/11/07/3.0-update/

@alexey-milovidov
Copy link
Member Author

First I will finish this PR to see what will change.
It's urgent because we have TSan report in openssl/openssl#10379

Then we can consider downgrading.

@alexey-milovidov
Copy link
Member Author

@alexey-milovidov
Copy link
Member Author

Performance test Ok.

@alexey-milovidov
Copy link
Member Author

01017_uniqCombined_memory_usage
01076_parallel_alter_replicated_zookeeper

  • flacky tests.

@alexey-milovidov
Copy link
Member Author

Update did not help.

@alexey-milovidov
Copy link
Member Author

The issue is fixed. No errors after

for i in {1..1000000}; do echo -n "$i " && curl -k https://localhost:8443; done

@alexey-milovidov alexey-milovidov merged commit 86a4cca into master Feb 27, 2020
@alexey-milovidov alexey-milovidov deleted the update-openssl branch February 27, 2020 12:07
@alexey-milovidov alexey-milovidov added the pr-bugfix Pull request with bugfix, not backported by default label Feb 27, 2020
@alexey-milovidov
Copy link
Member Author

alexey-milovidov commented Feb 27, 2020

Cannot provide an automated test case.

It does not quickly reproduce even if I run

pv /dev/random > /dev/null

in parallel.

@alexey-milovidov
Copy link
Member Author

Now I will try to replace it with version 1.1.1.

nikitamikhaylov pushed a commit that referenced this pull request Feb 28, 2020
Update OpenSSL

(cherry picked from commit 86a4cca)
nikitamikhaylov pushed a commit that referenced this pull request Feb 28, 2020
Update OpenSSL

(cherry picked from commit 86a4cca)
nikitamikhaylov pushed a commit that referenced this pull request Feb 29, 2020
Update OpenSSL

(cherry picked from commit 86a4cca)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-docs-needed pr-bugfix Pull request with bugfix, not backported by default
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants