[MDEV-26771] crash with OpenSSL 3.0.0 Created: 2021-10-06 Updated: 2022-01-20 Resolved: 2022-01-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Compiling, SSL |
| Affects Version/s: | 10.6.4 |
| Fix Version/s: | 10.2.42, 10.3.33, 10.4.23, 10.5.14, 10.6.6, 10.7.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Tomohiro KATO | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
I succeeded in building MariaDB 10.6.4 with OpenSSL 3.0.0 but failed to launch it. in include/ssl_compat.h:27:
In OpenSSL 3.0.0 the size of EVP_MD_CTX has been increased to 72. When I increased the value and built it, it started successfully. |
| Comments |
| Comment by Christopher Alexander Chavez [ 2022-01-14 ] |
|
Why is check_openssl_compatibility() not detecting this situation so that MariaDB aborts rather than crashes? Is the code which crashes (due to OpenSSL compatibility being assumed) executed before check_openssl_compatibility()? |
| Comment by Sergei Golubchik [ 2022-01-15 ] |
|
check_openssl_compatibility() doesn't always work, it's a best-effort check. one of the reasons why it might not work is this sentence from the man CRYPTO_set_mem_functions.
as soon as OpenSSL does it's very first memory allocation, CRYPTO_set_mem_functions() becomes a no-op. And may be OpenSSL 3.0 allocates something internally very early. |