Bug 2148269

Summary: dracut-cmdline[554]: Error in GnuTLS initialization: Error while performing self checks i FIPS mode
Product: Red Hat Enterprise Linux 9 Reporter: Jan Pazdziora <jpazdziora>
Component: gnutlsAssignee: Zoltan Fridrich <zfridric>
Status: CLOSED ERRATA QA Contact: Alexander Sosedkin <asosedki>
Severity: unspecified Docs Contact:
Priority: high    
Version: 9.0CC: asosedki, jpazdziora, ssorce
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gnutls-3.7.6-15.el9 Doc Type: Bug Fix
Doc Text:
Cause: HMAC file for gnutls, used for integrity checks in FIPS mode, has been moved to `/usr/lib64/.gnutls.hmac` Consequence: other software relying on HMAC file location wasn't able to locate it. For example, dracut no longer copied it to initramfs, impacting functionality of NetworkManager during early boot in FIPS mode Fix: gnutls HMAC file location has been moved back to `/usr/lib64/.libgnutls.so.30.hmac` Result: gnutls HMAC file is successfully installed into initramfs for machines switched to FIPS mode
Story Points: ---
Clone Of:
: 2149640 2149641 (view as bug list) Environment:
Last Closed: 2023-05-09 08:20:29 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:
Bug Depends On:    
Bug Blocks: 2149640, 2149641    

Description Jan Pazdziora 2022-11-24 19:56:26 UTC
Description of problem:

On RHEL 9.0 post-GA, message

[    8.190251] dracut-cmdline[554]: Error in GnuTLS initialization: Error while performing self checks. 

appears on the console when provisioning is run with the fips=1 parameter.

Version-Release number of selected component (if applicable):

gnutls-3.7.6-12.el9_0.x86_64
kernel-5.14.0-70.30.1.el9_0.x86_64
dracut-055-45.git20220404.el9_0.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. Provision RHEL 9.0 post-GA (for example the RHEL-9.0.0-updates-20221124.0 compose) with fips=1 parameter.
2. Check the console output.
3. After installation, run journalctl -l | grep dracut-cmdline

Actual results:

On console:

[    6.000073] Run /init as init process 
[    6.010192] systemd[1]: systemd 250-6.el9_0.1 running in system mode (+PAM +AUDIT +SELINUX -APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS -FIDO2 +IDN2 -IDN -IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified) 
[    6.016488] systemd[1]: Detected virtualization kvm. 
[    6.017502] systemd[1]: Detected architecture x86-64. 
[    6.018512] systemd[1]: Running in initial RAM disk. 
 
Welcome to       
Red Hat Enterprise Linux 9.0 (Plow) dracut-055-45.git20220404.el9_0 (Initramfs)   

[...]

[    8.041157] iscsi: registered transport (bnx2i) 
[    8.051385] iscsi: registered transport (be2iscsi) 
[    8.052363] In beiscsi_module_init, tt=0000000019776f30 
[    8.190251] dracut-cmdline[554]: Error in GnuTLS initialization: Error while performing self checks. 
[      
  OK     
] Finished         
dracut cmdline hook   
. 

[...]

[   11.069305] scsi host1: ata_piix 
[   11.071661] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc0a0 irq 14 
[   11.073028] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc0a8 irq 15 
Error in GnuTLS initialization: Error while performing self checks.  
<info>  [1669317503.0257] NetworkManager (version 1.36.0-5.el9_0) is starting... (for the first time)  
<info>  [1669317503.0275] Read config: /etc/NetworkManager/NetworkManager.conf (lib: initrd-no-auto-default.conf)  
         Starting         
D-Bus System Message Bus   
...  

[...]

[      
  OK     
] Reached target         
Switch Root   
.  
         Starting         
Switch Root   
...  
[   22.276278] systemd-journald[251]: Received SIGTERM from PID 1 (systemd). 
[   23.544009] SELinux:  policy capability network_peer_controls=1 

[...]

[   23.594013] systemd[1]: Successfully loaded SELinux policy in 187.017ms. 
[   23.725812] systemd[1]: Relabelled /dev, /dev/shm, /run, /sys/fs/cgroup in 57.999ms. 
[   23.742953] systemd[1]: systemd 250-6.el9_0.1 running in system mode (+PAM +AUDIT +SELINUX -APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS -FIDO2 +IDN2 -IDN -IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified) 
[   23.750279] systemd[1]: Detected virtualization kvm. 
[   23.751441] systemd[1]: Detected architecture x86-64. 
  
Welcome to       
Red Hat Enterprise Linux 9.0 (Plow)   

[...]

[      
  OK     
] Reached target         
Basic System   
.  
         Starting         
Anaconda FIPS service   
...  

[...]
Installing gnutls.x86_64 (91/356)      

[...]

[    1.751216] x86/mm: Checked W+X mappings: passed, no W+X pages found. 
[    1.752646] Run /init as init process 
[    1.764430] systemd[1]: systemd 250-6.el9_0.1 running in system mode (+PAM +AUDIT +SELINUX -APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS -FIDO2 +IDN2 -IDN -IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified) 
[    1.771446] systemd[1]: Detected virtualization kvm. 

[...]

         Starting         
dracut cmdline hook   
... 
[      
  OK     
] Finished         
Create Volatile Files and Directories   
. 
[    3.874061] dracut-cmdline[317]: Error in GnuTLS initialization: Error while performing self checks. 
[      
  OK     
] Finished         
dracut cmdline hook   
. 

On shell:

# journalctl -l | grep dracut-cmdline
Nov 24 14:28:10 machine.example.com dracut-cmdline[231]: dracut-9.0 (Plow) dracut-055-45.git20220404.el9_0
Nov 24 14:28:10 machine.example.com dracut-cmdline[231]: Using kernel command line parameters:    BOOT_IMAGE=(hd0,msdos1)/vmlinuz-5.14.0-70.30.1.el9_0.x86_64 root=/dev/mapper/rhel_machine-root ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M boot=UUID=e1a258c5-e326-4d4c-b276-6976f7619215 resume=/dev/mapper/rhel_machine-swap rd.lvm.lv=rhel_machine/root rd.lvm.lv=rhel_machine/swap fips=1 console=ttyS0,115200
Nov 24 14:28:10 machine.example.com dracut-cmdline[317]: Error in GnuTLS initialization: Error while performing self checks.
Nov 24 14:28:15 machine.example.com systemd[1]: dracut-cmdline.service: Deactivated successfully.

Expected results:

No GnuTLS related errors.

Additional info:

This does not happen when fips=0 is used.

This did not happen with RHEL 9.0 GA compose which installed

gnutls-3.7.3-9.el9.x86_64
kernel-5.14.0-70.13.1.el9_0.x86_64
dracut-055-45.git20220404.el9_0.x86_64

Comment 8 Alexander Sosedkin 2022-11-30 15:18:33 UTC
Note: reproducing this requires `dracut-network` package installed, which pulls in nmcli, which pulls in gnutls.

Comment 15 errata-xmlrpc 2023-05-09 08:20:29 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 (gnutls 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:2522