Bug 2143226

Summary: using --escrowcert with LUKS and FIPS results in segfault
Product: Red Hat Enterprise Linux 9 Reporter: Vojtech Trefny <vtrefny>
Component: libblockdevAssignee: Vojtech Trefny <vtrefny>
Status: CLOSED ERRATA QA Contact: guazhang <guazhang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.0CC: guazhang, JONATHAN.SATTELBERGER, jstodola, lagordon, storage-qe, vtrefny
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: libblockdev-2.28-3.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2142660 Environment:
Last Closed: 2023-05-09 07:28:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 guazhang@redhat.com 2022-12-01 04:54:50 UTC
Hi,

libblockdev-2.28-3.el9.x86_64  with enable fips 
looks block by https://bugzilla.redhat.com/show_bug.cgi?id=2148841

[root@intel-chiefriver-02 libblockdev-2.28]#  python3 tests/run_tests.py crypto_test.CryptoTestEscrow.test_backup_passphrase -i
/root/rpmbuild/BUILD/libblockdev-2.28/tests/crypto_test.py:14: PyGIWarning: BlockDev was imported without specifying a version first. Use gi.require_version('BlockDev', '2.0') before import to ensure that the right version gets loaded.
  from gi.repository import BlockDev, GLib
test_backup_passphrase (crypto_test.CryptoTestEscrow)
Verify that a backup passphrase can be created for a device ... 

Generating key.  This may take a few moments...

ERROR

======================================================================
ERROR: test_backup_passphrase (crypto_test.CryptoTestEscrow)
Verify that a backup passphrase can be created for a device
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/libblockdev-2.28/tests/crypto_test.py", line 718, in test_backup_passphrase
    succ = BlockDev.crypto_luks_format(self.loop_dev, None, 0, PASSWD, None, 0)
  File "/usr/lib64/python3.9/site-packages/gi/overrides/BlockDev.py", line 224, in crypto_luks_format
    return _crypto_luks_format(device, cipher, key_size, passphrase, key_file, min_entropy, luks_version, extra)
gi.repository.GLib.GError: g-bd-crypto-error-quark: Failed to format device: Invalid argument (3)

----------------------------------------------------------------------
Ran 1 test in 3.921s

FAILED (errors=1)
[root@intel-chiefriver-02 libblockdev-2.28]#

Comment 9 guazhang@redhat.com 2022-12-20 03:55:05 UTC
thanks update reproducer, move to verified.

Comment 11 errata-xmlrpc 2023-05-09 07:28:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (libblockdev bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2172