Description of problem: Disabling FIPS mode using fips-mode-setup --disable has the following issues: a) /etc/system-fips is not deleted b) dracut fips modules is not removed and initramsfs is not re-generated Version-Release number of selected component (if applicable): crypto-policies-20181026-1.gitcc78cb7.el8.noarch How reproducible: Always Steps to Reproduce: 1. Enable fips mode: fips-mode-setup --enable 2. Reboot 3. Disable fips mode: fips-mode-setup --disable 4. Reboot 5. Check dracut configuration, initramfs and /etc/system-fips. Actual results: Correct: * Bootloader configuration is upated correctly * FIPS mode is turned-off in kernel Incorrect: * /etc/system-fips is present * etc/system-fips is present in initramfs * dracut contains fips module * initramfs created in step (1) is not updated in (3) Expected results: * Bootloader configuration is upated correctly * FIPS mode is turned-off in kernel * /etc/system-fips is not present * etc/system-fips is not present in initramfs * dracut does not contains fips module * initramfs is re-generated in (3) Additional info: Moreover, fips-mode-setup --check does not detect this inconsistency (reports that FIPS mode is disabled and returns 0).
Yes, this is expected behavior implemented as required by FIPS 140-2 Implementation Guidance. The effect of fips-finish-install is and must be irreversible.
Thank you both. I also discussed with this with Tomas privately and now it makes sense to me. I did checked documentation and man page FIPS-FINISH-INSTAL(8) is quite clear about this: "[T]he completion of the installation cannot be undone. The system has to be reinstalled if the FIPS modules are not supposed to be installed anymore." Since we cannot really expect anyone to toggle between FIPS mode enabled and disabled I think this explanation is sufficient (in a combination with fips-mode-setup(8) man page). We should only make sure that components related to modules behave the same way as on the system where FIPS mode was never turned on.