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
Memory corruption in OpenSSL v3.0.2 on duplicate provider declaration #20981
Comments
Are you able to reproduce it with the tip of 3.0 branch? 3.0.2 is quite an old one and there were numerous bug fixes. |
Good question. Answer: No: 3.0.9-dev does not show the problem. So let's hope Ubuntu catches up... |
You might want to open a bug with Ubuntu and tell them that it does not impact upstream: |
Done: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/2019970 |
"Only v3.0.2"... does that mean you've tried with v3.0.3 and v3.0.1? I'm a bit curious when this stopped being a bug, or rather, what, exactly, fixed it. It could also be that Ubuntu is interested in that fix... |
I used v3.0.2 as that version was built-in to our CI image (Ubuntu 22). Crash was confirmed by a build-from-source of the tag "openssl-3.0.2". I now also built from source: Hope this helps. |
Closing as a fix is in all 3.x branch tips -- just not Ubuntu. |
FYI, just read a comment by the ubuntu team that made me very unhappy (from a security perspective):
I counted 24 OpenSSL CVE's (several of which with High Severity) that are not fixed due to this practice (since 3.0.2). Would anyone reading here want to chime in on the discussion there (or create a more visible one)? Would it be possible to help alleviate the concerns the Ubuntu team has wrt updating OpenSSL (minor) releases? |
IIUC, Ubuntu do actually backport the CVE fixes, just not necessarily all the other bug fixes. |
I think this is mostly artifact of history of OpenSSL "stable" releases not being stable enough. So large distributions just backport security fixes and other critical bug fixes but do not update to new patch releases. IMO we are now much better in that regard than in days of 1.0.x. |
Thanks for this information & Good to know: I'd never have guessed that they're going to these lengths (instead of simply upgrading to the next release). Edit/add: Also Thanks for your input at the Ubuntu forum! |
Only in v3.0.2 the following happens:
Prerequisites:
_build/lib
contains a softlink to a duplicate provider .so:that is referenced in the
scripts/openssl-ca.cnf
:This bug is reproducible in Ubuntu 22 (jammy) with the system-provided OpenSSL v3.0.2 as well as a built-from source version on tag "openssl-3.0.2". Here a link to a CI testrun demonstrating this behaviour and the full scripting required to reproduce (Open "Test" item as crash isn't treated as a bug in the script :-(
This bug does not occur when building openssl from source on branches/tags "master" or "openssl-3.1.0". FWIW,
oqsprovider
contains a build script that can facilitate such alternate builds easily, e.g., runningMAKE_PARAMS=-j OPENSSL_BRANCH=openssl-3.1.0 ./scripts/fullbuild.sh
.This is an extreme test corner case not happening in normal operation (with just one
oqsprovider
) and as OpenSSLv3.0.2 anyway does not feature full provider signature support, this bug is no problem for that application -- but it might be indicative of some memory handling bug fixed in 3.1.0 that may be worth while backporting.The text was updated successfully, but these errors were encountered: