RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2163497 - Installation crashes in FIPS mode with LUKS password shorter than 8 bytes
Summary: Installation crashes in FIPS mode with LUKS password shorter than 8 bytes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: anaconda
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Vladimír Slávik
QA Contact: Release Test Team
Sagar Dubewar
URL:
Whiteboard:
Depends On:
Blocks: 2129768
TreeView+ depends on / blocked
 
Reported: 2023-01-23 17:27 UTC by Jan Stodola
Modified: 2024-01-08 13:24 UTC (History)
8 users (show)

Fixed In Version: anaconda-34.25.3.2-1.el9
Doc Type: Bug Fix
Doc Text:
.Anaconda now validates LUKS passphrases for the FIPS requirements Previously, Anaconda did not check whether the length of LUKS passphrases satisfied the FIPS requirements, even though the underlying tools performed this check. As a consequence, installing in FIPS mode with a passphrase shorter than 8 characters caused the installer to stop prematurely. With this update, the installation program has been improved to validate and enforce the minimum length for passphrase. As a result, the installation program informs if the LUKS passphrase is too short for use in the FIPS mode and prevents the unexpected stop.
Clone Of:
Environment:
Last Closed: 2023-11-07 08:31:56 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-146040 0 None None None 2023-01-23 17:28:53 UTC
Red Hat Issue Tracker RTT-5265 0 None None None 2023-05-02 10:44:51 UTC
Red Hat Issue Tracker RTT-5266 0 None None None 2023-05-02 10:44:55 UTC
Red Hat Issue Tracker RTT-5267 0 None None None 2023-05-02 10:44:59 UTC
Red Hat Product Errata RHBA-2023:6414 0 None None None 2023-11-07 08:32:14 UTC

Description Jan Stodola 2023-01-23 17:27:55 UTC
Description of problem:
The minimal length of passwords used for LUKS/PBKDF2 in FIPS mode has been set to 8 bytes by openssl. See bug 2137557 and bug 2148841.

When a password shorter than 8 bytes is used in the installer (either specified in the kickstart file or entered manually in GUI), the installation fails with a traceback. Both luks1 and luks2 versions are affected.

It's still possible to use passwords shorter than 8 bytes when FIPS mode is not enabled.


Version-Release number of selected component (if applicable):
RHEL-9.2.0-20230123.13
cryptsetup-2.6.0-2.el9
openssl-3.0.7-2.el9
anaconda-34.25.2.6-1.el9

How reproducible:
Always

Steps to Reproduce:
1. Start installation in FIPS mode ("fips=1" on the kernel cmdline)
2. Create a LUKS device during the installation, set a password shorter than 8 bytes
3. Try to finish the installation.

The same problem can be reproduced with a kickstart installation and the following autopart command:
autopart --encrypted --passphrase=redhat

Actual results:
Anaconda crashes with a traceback.

Expected results:
The installer should not allow to use passwords shorter than 8 bytes in FIPS mode.

Additional info:
Traceback from storage.log:
...
DEBUG:blivet:                PartitionDevice.setup: vda3 ; orig: False ; status: True ; controllable: True ;
DEBUG:blivet:                LUKS.create: device: /dev/vda3 ; type: luks ; status: False ;
DEBUG:blivet:                  LUKS._create: device: /dev/vda3 ; type: luks ; status: False ;
INFO:program:[cryptsetup] Invalid passphrase for PBKDF2 in FIPS mode.

INFO:anaconda.threading:Thread Failed: AnaTaskThread-CreateStorageLayoutTask-1 (140122123155008)
ERROR:anaconda.modules.common.task.task:Thread AnaTaskThread-CreateStorageLayoutTask-1 has failed: Traceback (most recent call last):
  File "/usr/lib64/python3.9/site-packages/gi/overrides/BlockDev.py", line 1093, in wrapped
    ret = orig_obj(*args, **kwargs)
  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 add passphrase: Invalid argument (6)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.9/site-packages/pyanaconda/threading.py", line 275, in run
    threading.Thread.run(self)
  File "/usr/lib64/python3.9/threading.py", line 917, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.9/site-packages/pyanaconda/modules/common/task/task.py", line 96, in _thread_run_callback
    self._task_run_callback()
  File "/usr/lib64/python3.9/site-packages/pyanaconda/modules/common/task/task.py", line 109, in _task_run_callback
    self._set_result(self.run())
  File "/usr/lib64/python3.9/site-packages/pyanaconda/modules/storage/installation.py", line 86, in run
    self._turn_on_filesystems(
  File "/usr/lib64/python3.9/site-packages/pyanaconda/modules/storage/installation.py", line 166, in _turn_on_filesystems
    storage.do_it(callbacks)
  File "/usr/lib/python3.9/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/blivet/blivet.py", line 115, in do_it
    self.devicetree.actions.process(callbacks=callbacks, devices=self.devices)
  File "/usr/lib/python3.9/site-packages/blivet/actionlist.py", line 47, in wrapped_func
    return func(obj, *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/blivet/actionlist.py", line 284, in process
    action.execute(callbacks)
  File "/usr/lib/python3.9/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/blivet/deviceaction.py", line 662, in execute
    self.device.format.create(device=self.device.path,
  File "/usr/lib/python3.9/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/blivet/formats/__init__.py", line 517, in create
    self._create(**kwargs)
  File "/usr/lib/python3.9/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/blivet/formats/luks.py", line 322, in _create
    blockdev.crypto.luks_format(self.device,
  File "/usr/lib64/python3.9/site-packages/gi/overrides/BlockDev.py", line 1115, in wrapped
    raise transform[1](msg)
gi.overrides.BlockDev.CryptoError: Failed to add passphrase: Invalid argument

Comment 13 Vladimír Slávik 2023-05-23 18:10:53 UTC
PR: https://github.com/rhinstaller/anaconda/pull/4785

Comment 18 Jiri Kortus 2023-06-09 14:56:17 UTC
Related bug (warning/error messages in LUKS password dialog not relating to password length): BZ2213848

Comment 20 Jan Stodola 2023-06-13 11:36:09 UTC
Checked that anaconda-34.25.3.2-1.el9 is in nightly compose RHEL-9.3.0-20230613.0.

Moving to VERIFIED

Comment 28 errata-xmlrpc 2023-11-07 08:31:56 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 (anaconda 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:6414


Note You need to log in before you can comment on or make changes to this bug.