Bug 1668682
Summary: | libisc doesn't initialize entropy pool for ssl context | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Pavel Zhukov <pzhukov> | ||||||
Component: | bind | Assignee: | Petr Menšík <pemensik> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Petr Sklenar <psklenar> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 8.0 | CC: | pemensik, psklenar, thozza | ||||||
Target Milestone: | rc | ||||||||
Target Release: | 8.0 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | bind-9.11.4-25.P2.el8 | Doc Type: | If docs needed, set a value | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 1685940 (view as bug list) | Environment: | |||||||
Last Closed: | 2019-11-05 22:13:07 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: | 1622060 | ||||||||
Bug Blocks: | 1660865 | ||||||||
Attachments: |
|
Description
Pavel Zhukov
2019-01-23 10:30:42 UTC
This issue was fixed already in Fedora, when backported patch prepared to solve bug #1622060. It includes also entropy pool creation , which is feeded into initialized dst_lib_init. Base reason for this behaviour is bind library overrides random generator in OpenSSL with its own entropy generator. It does however also in case dst__openssl_init() called from dns_lib_init() call, which is called from dhcp. In this case, it does not create and initialize entropy pool, but resets OpenSSL random generator to wrappers around internal entropy pool. That returns error if random data are requested. Which is not usually true in DHCP, it never calls RAND_bytes() directly or by wrapper function from ISC library. But it is called from SSL setup in OpenLDAP linked to the same binary. Fix of bug #1622060 skips resetting OpenSSL random generator with custom one from BIND library, which also prevents this issue. Random data are always provided by default RAND_OpenSSL() implementation. Disadvantage of current patch triggered another error in Fedora, in bug #1663318. It checks whether there is enough entropy on startup. This can prevent dhclient to initialize soon after installation, where not enough entropy was gathered. I solved that by disabling OpenSSL random generator for DHCP. That might be unwanted for TLS contexts created by LDAP. I could not find any call to random data from DHCP itself. TLS data used by LDAP might not be generated with true random data. I think check for enough random entropy should be disabled when initialized from DHCP, but not API is prepared for it now. Could reuse eflags for entropy flags for such indication. Created attachment 1522771 [details]
additional patch to disable entropy check on startup
I think more simple solution should be used. With addition to ISC_PLATFORM_CRYPTORANDOM support patch, RAND_status check just should be disabled when built without threads for DHCP.
Alternative solution is to replace #ifndef ISC_PLATFORM_CRYPTORANDOM with #ifndef ISC_PLATFORM_USETHREADS in lib/dns/openssl_link.c, skipping OpenSSL random numbers reset. Other parts would not be touched.
Created attachment 1522844 [details]
Alternative patch for current RHEL8, just disable custom entropy
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, 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/RHSA-2019:3552 |