OpenSSL "double free" error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wget (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
openssl config file is being loaded twice, causing engines to be loaded twice if specified therein, causing double free errors and other strange behavior.
[Test plan]
Run the command of the package being tested in
gdb -ex "break CONF_modules_
and make sure it only breaks one.
Regression test:
In default Ubuntu configuration, either no openssl configuration is provided, or it contains no settings that affect wget. This code path changes how/when openssl configuration is loaded and used by openssl. One should verify that:
1) wget continues to work without openssl.cnf
2) wget continues to work with stock ubuntu unmodified openssl.cnf
3) wget continue to honor and use custom TLS settings that one may have specified in openssl.cnf (for example custom engine)
[Where problems could occur]
wget: This is an upstream change that changes initialization and is in use in later releases. Since it mostly removes an unneeded call to the load file function, a regression could be a config file being ignored, but it seems unlikely given the use in later releases
[Original bug report]
"double free" error is seen when using curl utility. Error is from libcrypto.so which is part of the OpenSSL package. This happens only when OpenSSL is configured to use a dynamic engine.
OpenSSL version is 1.1.1f
The issue is not encountered if http://
OpenSSL can be configured to use a dynamic engine by editing the default openssl config file which is located at '/etc/ssl/
On Bluefield systems, config diff to enable PKA dynamic engine, is as below:
+openssl_conf = conf_section
+
# Extra OBJECT IDENTIFIER info:
#oid_file = $ENV::HOME/.oid
oid_section = new_oids
+[ conf_section ]
+engines = engine_section
+
+[ engine_section ]
+bf = bf_section
+
+[ bf_section ]
+engine_id=pka
+dynamic_
+init=0
+
engine_id above refers to dynamic engine name/identifier.
dynamic_path points to the .so file for the dynamic engine.
# curl -O https:/
double free or corruption (out)
Aborted (core dumped)
description: | updated |
information type: | Public → Private |
information type: | Private → Private Security |
Changed in openssl (Ubuntu): | |
importance: | Undecided → Critical |
information type: | Private Security → Public Security |
Changed in openssl (Ubuntu Focal): | |
importance: | Undecided → Critical |
tags: | added: fr-1852 |
description: | updated |
Changed in wget (Ubuntu Focal): | |
status: | Incomplete → In Progress |
no longer affects: | openssl (Ubuntu Focal) |
no longer affects: | openssl (Ubuntu) |
@ Mahantesh Salimath
You have opened a public bug report against community supported Ubuntu distribution only, which is not monitored by the dedicated Canonical engineers for the engagement project you are possibly part of.
If this issue is related to the chelmsford project, could you please open a bug report in the chelmsford project?
I do not have a way to move this ticket there, and I have for now marked this bug report private.