openssl engine error if trying to exploit hw crypto on z due to library issue
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
Medium
|
Dimitri John Ledkov | ||
libica (Ubuntu) |
Invalid
|
Undecided
|
Dimitri John Ledkov | ||
Xenial |
Invalid
|
Undecided
|
Unassigned | ||
Yakkety |
Invalid
|
Undecided
|
Dimitri John Ledkov | ||
openssl (Ubuntu) |
Invalid
|
Undecided
|
Dimitri John Ledkov | ||
Xenial |
Invalid
|
Undecided
|
Unassigned | ||
Yakkety |
Invalid
|
Undecided
|
Dimitri John Ledkov | ||
openssl-ibmca (Ubuntu) |
Fix Released
|
Medium
|
Dimitri John Ledkov | ||
Xenial |
Fix Released
|
Medium
|
Dimitri John Ledkov | ||
Yakkety |
Fix Released
|
Medium
|
Dimitri John Ledkov |
Bug Description
[Testcase]
* configure ibmca engine as per below instructions
* execute openssl engine -c -vvvv
* it should complete without any loading errors
[Impact]
* Out of the box stock configuration results in non-usable engine which errors out
* Thus currently, without workarounds, the acceleration engine does not work. Meaning regression potential is low
Please note this is the first time we are integrating openssl-ibmca, and it is not enabled by default. Hopefully things will be better / more stable going forward.
openssl-ibmca usually requires libica2 and libica-utils for proper functioning and all required tooling (like icainfo, icastats, etc.)
But after the installation of these packages and the configuration, with is like this:
sudo tee -a /etc/ssl/
sudo vi /etc/ssl/
adding the following line as the first active one:
openssl_conf = openssl_def
and removing or commenting all other occurrences of that line in the config file
and saving and closing the openssl.cnf file
this output of the openssl engine command is expected:
$ openssl engine
(dynamic) Dynamic engine loading support
(ibmca) Ibmca hardware engine support
or even more precise these chiphers should be listed in case of "-c":
$ openssl engine -c
(dynamic) Dynamic engine loading support
(ibmca) Ibmca hardware engine support
[RAND, DES-ECB, DES-CBC, DES-OFB, DES-CFB, DES-EDE3, DES-EDE3-CBC, DES-EDE3-OFB, DES-EDE3-CFB, AES-128-ECB, AES-192-ECB, AES-256-ECB, AES-128-CBC, AES-192-CBC, AES-256-CBC, AES-128-OFB, AES-192-OFB, AES-256-OFB, AES-128-CFB, AES-192-CFB, AES-256-CFB, SHA1, SHA256, SHA512]
But instead openssl is giving this error, due to a missing "libica.so":
$ openssl engine
Error configuring OpenSSL
4395950360208:
4395950360208:
4395950360208:
4395950360208:
4395950360208:
4395950360208:
4395950360208:
4395950360208:
$
There is no libica.so that is shipped with any of the above packages (verified with dpkg -l) or otherwise available in the filesystem:
$ sudo find / -name "libica.so" 2>/dev/null
ubuntu@HWE0001:~$
But there is a different verison of that libica:
$ sudo find / -name "*libica.so*" 2>/dev/null
/usr/lib/
/usr/lib/
$
So there are right now two workarounds:
1)
creating a (symbolic) link from libica.so.2 to libica.so, like
$ sudo ln -s /usr/lib/
that allows openssl to find a library named 'libica.so':
18:15:00: <email address hidden>: ubuntu@HWE0001:~$ openssl engine
(dynamic) Dynamic engine loading support
(ibmca) Ibmca hardware engine support
But this could lead to issues in case of any potential functions or interface changes there we introduced with libica.so.2
2)
installation of the "libica-dev" package that provides a (development) version of libica.so:
$ dpkg -L libica-dev | grep libica.so
/usr/lib/
$
But the hardware crypto exploitation should work out of the box w/o the link or the libica-dev package.
Either libica.so should be shipped (in addition to libica.so.2) with the proper dependency to openssl-ibmca - openssh-ibmca should make use of libica2 instead of libica.so.2...
affects: | mongodb (Ubuntu) → openssl-ibmca (Ubuntu) |
tags: | added: s390x |
summary: |
- openssl engine throws errir if trying to exploit hw crypto on z due to + openssl engine throws error if trying to exploit hw crypto on z due to library issue |
summary: |
- openssl engine throws error if trying to exploit hw crypto on z due to - library issue + openssl engine error if trying to exploit hw crypto on z due to library + issue |
Changed in openssl (Ubuntu): | |
assignee: | nobody → Dimitri John Ledkov (xnox) |
Changed in libica (Ubuntu): | |
assignee: | nobody → Dimitri John Ledkov (xnox) |
Changed in openssl-ibmca (Ubuntu): | |
assignee: | nobody → Dimitri John Ledkov (xnox) |
Changed in libica (Ubuntu): | |
status: | New → Confirmed |
Changed in openssl (Ubuntu): | |
status: | New → Confirmed |
Changed in openssl-ibmca (Ubuntu): | |
status: | New → Confirmed |
Changed in openssl (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in libica (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in openssl (Ubuntu Xenial): | |
status: | New → Invalid |
Changed in openssl-ibmca (Ubuntu Xenial): | |
importance: | Undecided → Medium |
Changed in libica (Ubuntu Xenial): | |
status: | New → Invalid |
Changed in openssl-ibmca (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in openssl-ibmca (Ubuntu Yakkety): | |
status: | Fix Committed → In Progress |
Changed in openssl-ibmca (Ubuntu Xenial): | |
assignee: | nobody → Dimitri John Ledkov (xnox) |
description: | updated |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
Changed in ubuntu-z-systems: | |
status: | New → Fix Committed |
importance: | Undecided → Medium |
Changed in ubuntu-z-systems: | |
assignee: | nobody → Dimitri John Ledkov (xnox) |
Changed in ubuntu-z-systems: | |
status: | Fix Committed → Fix Released |
Please try packages from:
sudo add-apt-repository ppa:ci- train-ppa- service/ 2043
sudo apt update
sudo apt full-upgrade
With packages there, libica.so is still attempted to be loaded first. If that fails, libica.so.2 is attempted to be loaded, and that should succeed.
Before: error:25066067: DSO support routines: DLFCN_LOAD: could not load the shared library: dso_dlfcn. c:187:filename( libica. so): libica.so: cannot open shared object file: No such file or directory error:25070067: DSO support routines: DSO_load: could not load the shared library: dso_lib. c:233: error:80066068: lib(128) :IBMCA_ INIT:dso failure: e_ibmca. c:1286:
$ openssl engine ibmca
(ibmca) Ibmca hardware engine support
4396855273104:
4396855273104:
4396855273104:
After: error:25066067: DSO support routines: DLFCN_LOAD: could not load the shared library: dso_dlfcn. c:187:filename( libica. so): libica.so: cannot open shared object file: No such file or directory error:25070067: DSO support routines: DSO_load: could not load the shared library: dso_lib. c:233:
$ openssl engine ibmca
(ibmca) Ibmca hardware engine support
4396661810832:
4396661810832:
Which is still a bit ugly messaging, but should work out of the box.