Bug 1772111 - named-pkcs11 does not start in FIPS mode
Summary: named-pkcs11 does not start in FIPS mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bind
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Menšík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1709553
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-13 16:51 UTC by Christian Heimes
Modified: 2019-12-13 01:04 UTC (History)
11 users (show)

Fixed In Version: bind-9.11.13-2.fc30 bind-9.11.13-2.fc31 bind-9.11.13-2.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-29 00:54:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Christian Heimes 2019-11-13 16:51:40 UTC
Description of problem:
FreeIPA with DNS server and DNSSEC does not work on Fedora 30 and 31 in FIPS mode. named-pkcs11 fails to start with error message "invalid algorithm 'RSAMD5'".

Version-Release number of selected component (if applicable):
freeipa-server-4.8.2-1.fc30.x86_64
bind-pkcs11-9.11.11-1.fc30.x86_64
crypto-policies-20190527-1.git0b3add8.fc30

How reproducible:
always

Steps to Reproduce:
1. put system in FIPS mode
2. Install FreeIPA with ipa-server-install
3. ipa-dns-install --dnssec-master --auto-forwarders -U

Actual results:
Starting Berkeley Internet Name Domain (DNS) with native PKCS#11...
/etc/crypto-policies/back-ends/bind.config:2: invalid algorithm 'RSAMD5'
named-pkcs11.service: Control process exited, code=exited, status=1/FAILURE
named-pkcs11.service: Failed with result 'exit-code'.
Failed to start Berkeley Internet Name Domain (DNS) with native PKCS#11.

Expected results:
No error

Additional info:
named-pkcs11 starts successfully after I have removed RSAMD5 from /usr/share/crypto-policies/FIPS/bind.txt

Comment 1 Christian Heimes 2019-11-13 17:32:08 UTC
This looks like a duplicated of #1709553. According to the ticket the problem has been fixed by bind-9.11.10-1.fc30, but slightly newer package bind-9.11.11-1.fc30 is failing for me.

Comment 2 Christian Heimes 2019-11-13 17:33:45 UTC
I'm moving the issue to bind.

Comment 3 Petr Menšík 2019-11-25 21:11:13 UTC
According to my testing, current code in Fedora works well on RHEL 8, where setting FIPS mode is easier for me. Some testing environment overrides do not work the same way on Fedora.

Comment 4 Petr Menšík 2019-11-25 21:15:08 UTC
Tried on internal infrastructure with test rndc-and-pkcs11 [1], my earlier modification seems to be passing. But would recheck it also with FreeIPA on virtual machine.

1. https://github.com/InfrastructureServices/bind-tests/tree/master/Sanity/rndc-and-pkcs11

Comment 5 Christian Heimes 2019-11-26 08:38:26 UTC
The test [1] case does not update the crypto policy to FIPS. named-pkcs11 fails to start when the crypto policy is configured to FIPS mode and named.conf includes the bind configuration snippet from the crypto policy:

# update-crypto-policies --show
FIPS
# cat /etc/named.conf
options {
        ...
        include "/etc/crypto-policies/back-ends/bind.config";
};

Comment 6 Petr Menšík 2019-11-26 14:08:15 UTC
Machine I prepared with fips-mode-setup --enable failed to boot.

It failed on F30:

[    7.366513] ---[ end Kernel panic - not syncing: alg: self-tests for ofb(aes) (ofb(aes)) failed in fips mode! ]--- 

Should be update-crypto-policies --set FIPS enough to reproduce this issue?

Comment 7 Christian Heimes 2019-11-26 14:10:32 UTC
Yes, that should be enough to reproduce the issue. You also have to include the crypto policy snippet in case it is not included by default.

Comment 9 Petr Menšík 2019-11-26 16:03:08 UTC
# update-crypto-policies --show
FIPS

# rpm -q bind-pkcs11 crypto-policies freeipa-server
bind-pkcs11-9.11.11-1.fc30.x86_64
crypto-policies-20190527-1.git0b3add8.fc30.noarch
freeipa-server-4.8.2-1.fc30.x86_64

# ipactl status
Directory Service: RUNNING
krb5kdc Service: RUNNING
kadmin Service: RUNNING
named Service: RUNNING
httpd Service: RUNNING
ipa-custodia Service: RUNNING
pki-tomcatd Service: RUNNING
ipa-otpd Service: RUNNING
ipa-dnskeysyncd Service: RUNNING
ipa: INFO: The ipactl command was successful

# grep -C 3 MD5 /etc/crypto-policies/back-ends/bind.config 
disable-algorithms "." {
RSAMD5;
RSASHA1;
NSEC3RSASHA1;
DSA;


I am not able to reproduce this issue on my machine. But as I said, fips=1 kernel parameter prevents my machine from booting.

Comment 11 Petr Menšík 2019-11-26 18:14:32 UTC
Oh, found that issue. It contains quite similar copy in lib/bind9, which prevents disabled algorithm without the same fix.

Comment 13 Fedora Update System 2019-11-27 12:07:10 UTC
FEDORA-2019-c703d2304a has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-c703d2304a

Comment 14 Fedora Update System 2019-11-27 12:12:53 UTC
FEDORA-2019-73a8737068 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-73a8737068

Comment 15 Ben Cotton 2019-11-27 14:17:34 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 16 Ben Cotton 2019-11-27 15:03:49 UTC
This bug was accidentally closed due to a query error. Reopening.

Comment 17 Fedora Update System 2019-11-28 01:44:27 UTC
bind-9.11.13-2.fc31, bind-dyndb-ldap-11.2-2.fc31, dnsperf-2.3.2-2.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-73a8737068

Comment 18 Fedora Update System 2019-11-28 02:21:36 UTC
bind-9.11.13-2.fc30, bind-dyndb-ldap-11.1-20.fc30, dhcp-4.3.6-38.fc30, dnsperf-2.3.2-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-c703d2304a

Comment 19 Fedora Update System 2019-11-29 00:54:12 UTC
bind-9.11.13-2.fc31, bind-dyndb-ldap-11.2-2.fc31, dnsperf-2.3.2-2.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2019-12-13 01:04:09 UTC
bind-9.11.13-2.fc30, bind-dyndb-ldap-11.1-20.fc30, dhcp-4.3.6-38.fc30, dnsperf-2.3.2-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


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