Apps expecting an OpenSSL 1.1 -formatted openssl.cnf fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nodejs (Ubuntu) |
Confirmed
|
Medium
|
Unassigned | ||
Jammy |
Confirmed
|
Medium
|
Unassigned | ||
Kinetic |
Won't Fix
|
Medium
|
Unassigned | ||
openssl (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Jammy |
Won't Fix
|
High
|
Unassigned | ||
Kinetic |
Fix Released
|
High
|
Unassigned |
Bug Description
[Impact]
While the default configuration works fine for every package that uses the system libssl3, libssl1.1.1 (which implicitly loads the configuration on OPENSSL_
Our nodejs package vendors openssl 1.1.1, which means it will trigger this bug. In addition, upstream NodeJS explicitly points their statically-linked OpenSSL to this file as well, and ships 1.1.1 in their current LTS (branch 16.x).
Finally, we can also expect breakage for third-party packages that still depends on libssl1.1.
If the provider section isn't present in the configuration, libssl3 will load the default provider, which means that commenting out the section won't impact the behavior of standard libssl3 users.
[Test Plan]
On a system with a pristine openssl configuration:
$ sudo apt install nodejs
$ nodejs - <<EOF
var crypto = require('crypto')
const { privateKey, publicKey } = crypto.
var sign = crypto.
sign.update(
sign.sign(
EOF
Without the fix, the nodejs execution will have a non-zero return code and an uncaught exception with the following line:
Error: error:25066067:DSO support routines:
With the fix, there shouldn't be any output, and an exit code of 0.
[Where problems could occur]
There could easily be user errors when trying to merge the new configuration, for instance if they enabled the legacy provider, as they might comment out the default provider loading section (which is necessary if any other provider is explicitly loaded).
[Other Info]
Dear SRU team, please do not move this from -proposed to -updates before
the apt phasing fix has reached it first:
https:/
[Original report]
~ $ lsb-release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
https:/
That patch solves a problem with programs that use OpenSSL v1 (statically or dynamically linked); these still read /etc/ssl/
One example: https:/
Another example: a (non-Ubuntu) Node.js v16 (OpenSSL compiled statically) hits an error in its crypto lib:
~ $ node
Welcome to Node.js v16.15.0.
Type ".help" for more information.
> const { privateKey, publicKey } = crypto.
…
> var sign = crypto.
…
> sign.update(
…
> sign.sign(
Uncaught:
Error: error:25066067:DSO support routines:
at Sign.sign (node:internal/
opensslErrorS
'error:
'error:
'error:
],
library: 'DSO support routines',
function: 'dlfcn_load',
reason: 'could not load the shared library',
code: 'ERR_OSSL_
}
Removing the relevant provider section lines (the Debian patch doesn't apply cleanly, hence the use of sed) fixes it:
~ $ sed -i '/_sect\b/s/^/# /' /etc/ssl/
~ $ node
Welcome to Node.js v16.15.0.
Type ".help" for more information.
> const { privateKey, publicKey } = crypto.
…
> var sign = crypto.
…
> sign.update(
…
> sign.sign(
<Buffer c5 e7 ba 01 5a 33 3f 26 43 bb 4e 47 99 49 e4 c7 60 41 be c6 91 63 c6 5d 0a af 78 5c 15 4a 9f 1a e7 24 99 ce 6a f0 05 b5 48 96 4e 59 b8 d5 69 df 3c bc ... 206 more bytes>
I realize there is no libssl1.1 on jammy, but a statically linked OpenSSL is not uncommon (Node.js being a very prominent example).
Would it be possible to get this Debian sid change ported to jammy?
CVE References
tags: | added: rls-jj-incoming |
tags: | added: fr-2496 |
tags: | removed: rls-jj-incoming |
Changed in nodejs (Ubuntu Jammy): | |
importance: | Undecided → Medium |
Changed in nodejs (Ubuntu Kinetic): | |
importance: | Undecided → Medium |
description: | updated |
description: | updated |
For reference, here is a related Node.js discussion (converted from an issue): https:/ /github. com/nodejs/ node/discussion s/43184