Bug 2118654

Summary: Libcryptsetup must check only for '/proc/sys/crypto/fips_enabled' to detect system in FIPS mode [rhel-9.0.0.z]
Product: Red Hat Enterprise Linux 9 Reporter: RHEL Program Management Team <pgm-rhel-tools>
Component: cryptsetupAssignee: Ondrej Kozina <okozina>
Status: CLOSED ERRATA QA Contact: guazhang <guazhang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: agk, gmazyland, guazhang, jbrassow, jpazdziora, jstodola, okozina, prajnoha, ssorce
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cryptsetup-2.4.3-4.el9_0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2080516 Environment:
Last Closed: 2022-09-20 14:12:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2080516    
Bug Blocks:    

Comment 1 guazhang@redhat.com 2022-08-17 08:52:04 UTC
Hi
[anaconda root@storageqe-59 ~]# sysctl crypto.fips_enabled
crypto.fips_enabled = 1
[anaconda root@storageqe-59 ~]# dd if=/dev/zero of=test.tar bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 0.197924 s, 530 MB/s
[anaconda root@storageqe-59 ~]#  ls /etc/system-fips
ls: cannot access '/etc/system-fips': No such file or directory
[anaconda root@storageqe-59 ~]# 
[anaconda root@storageqe-59 ~]# cryptsetup luksFormat --pbkdf argon2id  test.tar -q

Enter passphrase for test.tar: 
Only PBKDF2 is supported in FIPS mode.
Failed to set pbkdf parameters.
[anaconda root@storageqe-59 ~]# 
[anaconda root@storageqe-59 ~]# cryptsetup luksFormat --pbkdf argon2id  test.tar -q
   ^C
[anaconda root@storageqe-59 ~]# cryptsetup luksFormat  test.tar -q
Enter passphrase for test.tar: 
[anaconda root@storageqe-59 ~]#  cryptsetup luksDump  test.tar | grep PBKDF
        PBKDF:      pbkdf2
[anaconda root@storageqe-59 ~]# 

[anaconda root@storageqe-59 ~]# uname -a
Linux storageqe-59.rhts.eng.pek2.redhat.com 5.14.0-70.13.1.el9_0.x86_64 #1 SMP PREEMPT Thu Apr 14 12:42:38 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux
[anaconda root@storageqe-59 ~]# 


test pass with cryptsetup-2.4.3-4.el9_0.1 and RHEl-9.0.0 Z stream

Comment 10 errata-xmlrpc 2022-09-20 14:12:31 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 (cryptsetup 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-2022:6606