See https://www.openssl.org/news/secadv/20220503.txt. The c_rehash script allows command injection (CVE-2022-1292) ============================================================ Severity: Moderate The c_rehash script does not properly sanitise shell metacharacters to prevent command injection. This script is distributed by some operating systems in a manner where it is automatically executed. On such operating systems, an attacker could execute arbitrary commands with the privileges of the script. Use of the c_rehash script is considered obsolete and should be replaced by the OpenSSL rehash command line tool. This issue affects OpenSSL versions 1.0.2, 1.1.1 and 3.0. OpenSSL 1.0.2 users should upgrade to 1.0.2ze (premium support customers only) OpenSSL 1.1.1 users should upgrade to 1.1.1o OpenSSL 3.0 users should upgrade to 3.0.3 This issue was reported to OpenSSL on the 2nd April 2022. It was found by Elison Niven of Sophos. The fix was developed by Tomas Mraz from OpenSSL. --- Resource leakage when decoding certificates and keys (CVE-2022-1473) ==================================================================== Severity: Low The OPENSSL_LH_flush() function, which empties a hash table, contains a bug that breaks reuse of the memory occuppied by the removed hash table entries. This function is used when decoding certificates or keys. If a long lived process periodically decodes certificates or keys its memory usage will expand without bounds and the process might be terminated by the operating system causing a denial of service. Also traversing the empty hash table entries will take increasingly more time. Typically such long lived processes might be TLS clients or TLS servers configured to accept client certificate authentication. The function was added in the OpenSSL 3.0 version thus older releases are not affected by the issue. It was addressed in the 3.0.3 release on the 3rd May 2022. The fix can be found in git commit 64c85430f. OpenSSL 1.0.2 users are not affected. OpenSSL 1.1.1 users are not affected. OpenSSL 3.0 users should upgrade to 3.0.3. This issue was reported to OpenSSL on the 21st April 2022 by Aliaksei Levin. The fix was developed by Hugo Landau from OpenSSL. Note ==== OpenSSL 1.0.2 is out of support and no longer receiving public updates. Extended support is available for premium support customers: https://www.openssl.org/support/contracts.html OpenSSL 1.1.0 is out of support and no longer receiving updates of any kind. The impact of these issues on OpenSSL 1.1.0 has not been analysed. Users of these versions should upgrade to OpenSSL 3.0 or 1.1.1.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a796465aab66d211626dda8a31633fd68117aace commit a796465aab66d211626dda8a31633fd68117aace Author: Sam James <sam@gentoo.org> AuthorDate: 2022-05-03 21:32:20 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-05-03 21:32:26 +0000 dev-libs/openssl: add 3.0.3 Masked still (3.x) so not the focus of the sec bug, but need to bump to address some vulnerabilities anyhow. Bug: https://bugs.gentoo.org/842489 Signed-off-by: Sam James <sam@gentoo.org> dev-libs/openssl/Manifest | 2 + dev-libs/openssl/openssl-3.0.3.ebuild | 297 ++++++++++++++++++++++++++++++++++ 2 files changed, 299 insertions(+)
The first vuln affects the perl-based c_rehash script that is shipped with OpenSSL. It seems Gentoo is not using that, but installs its own version of c_rehash, which is written in bash and comes from pld-linux (it seems to be a fork of an older version from OpenSSL). I tried playing around with that to see if I could find a similar vuln. I haven't found a straight command injection, but it does seem to lack proper filename quoting. E.g. the following: cp ISRG_Root_X1.pem 'foo bar .pem' cp ISRG_Root_X1.pem foo will lead to c_rehash executing the nonexistend "openssl bar" command: Invalid command 'bar'; type "help" for a list. In any case: I don't know what triggered the decision to ship a non-upstream version of that script, but given upstream recommends deprecating it we should probably do so as well (and switch to the internal "openssl rehash" command).
(In reply to Hanno Böck from comment #2) > I don't know what triggered the decision to ship a non-upstream > version of that script see bug #333117 - not to RDEPEND on perl afaicr > but given upstream recommends deprecating it we > should probably do so as well (and switch to the internal "openssl rehash" > command) agreed
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=458daf054634ccaa6e5df1a53339e0f57f2755a6 commit 458daf054634ccaa6e5df1a53339e0f57f2755a6 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-08-29 20:51:15 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-08-29 20:51:41 +0000 dev-libs/openssl: drop 1.1.1n, 1.1.1o, 1.1.1o-r1, 1.1.1p Bug: https://bugs.gentoo.org/856592 Bug: https://bugs.gentoo.org/842489 Signed-off-by: Sam James <sam@gentoo.org> dev-libs/openssl/Manifest | 7 - .../files/openssl-1.1.1p-fix-test-build.patch | 52 ---- dev-libs/openssl/openssl-1.1.1n.ebuild | 298 ------------------ dev-libs/openssl/openssl-1.1.1o-r1.ebuild | 338 --------------------- dev-libs/openssl/openssl-1.1.1o.ebuild | 318 ------------------- dev-libs/openssl/openssl-1.1.1p.ebuild | 337 -------------------- 6 files changed, 1350 deletions(-)
GLSA request filed
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/data/glsa.git/commit/?id=143e8d174e14e346f2c37e8a31a4be211ac3e24c commit 143e8d174e14e346f2c37e8a31a4be211ac3e24c Author: GLSAMaker <glsamaker@gentoo.org> AuthorDate: 2022-10-16 14:27:07 +0000 Commit: John Helmert III <ajak@gentoo.org> CommitDate: 2022-10-16 14:39:36 +0000 [ GLSA 202210-02 ] OpenSSL: Multiple Vulnerabilities Bug: https://bugs.gentoo.org/741570 Bug: https://bugs.gentoo.org/809980 Bug: https://bugs.gentoo.org/832339 Bug: https://bugs.gentoo.org/835343 Bug: https://bugs.gentoo.org/842489 Bug: https://bugs.gentoo.org/856592 Bug: https://bugs.gentoo.org/876787 Signed-off-by: GLSAMaker <glsamaker@gentoo.org> Signed-off-by: John Helmert III <ajak@gentoo.org> glsa-202210-02.xml | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+)
GLSA released, all done!
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=530086715f82de12009538347725dbfd14e6b0a8 commit 530086715f82de12009538347725dbfd14e6b0a8 Author: John Helmert III <ajak@gentoo.org> AuthorDate: 2022-10-14 03:47:09 +0000 Commit: John Helmert III <ajak@gentoo.org> CommitDate: 2022-10-16 14:52:19 +0000 profiles: mask <openssl-1.1.1 Bug: https://bugs.gentoo.org/876787 Bug: https://bugs.gentoo.org/741570 Bug: https://bugs.gentoo.org/809980 Bug: https://bugs.gentoo.org/832339 Bug: https://bugs.gentoo.org/835343 Bug: https://bugs.gentoo.org/842489 Bug: https://bugs.gentoo.org/856592 Closes: https://github.com/gentoo/gentoo/pull/22909 Signed-off-by: John Helmert III <ajak@gentoo.org> profiles/package.mask | 5 +++++ 1 file changed, 5 insertions(+)