Bug 1632786
Summary: | rngd lists no entropy sources, but still reads from TPM2 | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Vilém Maršík <vmarsik> |
Component: | rng-tools | Assignee: | Neil Horman <nhorman> |
Status: | CLOSED ERRATA | QA Contact: | Vilém Maršík <vmarsik> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.6 | CC: | nhorman, vmarsik |
Target Milestone: | rc | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-08-06 13:18:44 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: |
Description
Vilém Maršík
2018-09-25 14:26:16 UTC
And I wonder how to disable this TPM2 source with the '-x' option. tpm2 exports its entropy as a hwrng (/dev/hwrng), and your command line doesn't disable the hwrng entropy source (-x 0) (In reply to Neil Horman from comment #4) > tpm2 exports its entropy as a hwrng (/dev/hwrng), and your command line > doesn't disable the hwrng entropy source (-x 0) Then why is that source not listed there? That is an excellent question. Can you post the console output of rngd here please? See Description: # rngd -f -d -x 1 -x 2 -x 5 Disabling 1: TPM RNG Device Disabling 2: Intel RDRAND Instruction RNG Disabling 5: JITTER Entropy generator Initalizing available sources ^ i.e. TPM2/HWRNG not listed but used (and the '-x' flags make no difference in what was printed). Now I have found that the source gets listed by the '-l' flag: # rngd -l Entropy sources that are available but disabled 1: TPM RNG Device 4: NIST Network Entropy Beacon Available and enabled entropy sources: 0: Hardware RNG Device 2: Intel RDRAND Instruction RNG 5: JITTER Entropy generator This is what I had on my mind while reporting this, think about reopening. Any ideas? I'm not sure what you're driving at. I'm sorry you didn't realize that rngd -l lists the entropy sources (though that is documented in the man page). It seems pretty clear to me that source 0 (hwrng) is enabled and available, so thats where your getting entropy from. What is the ask here. Are you looking for a message that expressly indicates that the hwrng is being enabled? If so, sure I can do that, though I'd like to be sure thats what your after first Yes, I ask for message that HWRNG is being used, when it is the case. Otherwise it's confusing: I run rngd, it says it uses RDRAND + JITTER: # rngd -f -d Initalizing available sources Enabling RDRAND rng support Enabling JITTER rng support Now I run it with these sources disabled, rngd runs with no sources listed and does not exit: # rngd -f -d -x 2 -x 5 Disabling 2: Intel RDRAND Instruction RNG Disabling 5: JITTER Entropy generator Initalizing available sources Strangely, entropy is still increasing, where did it come from? # rngd -l (...) Available and enabled entropy sources: 0: Hardware RNG Device 2: Intel RDRAND Instruction RNG 5: JITTER Entropy generator Ah, there is a secret source 0, that was hidden before. Could it have been listed instead? In fairness, its not unlisted, the list command clearly shows it. But I take your meaning, clearly calling out all sources as they are initalized is a good idea. I'll take care of that, though It may be too late for 7.6. I'll try my best I know that the list commands shows that, but still got quite confused that the '-d' did not, before trying to use '-l'. Would like to avoid such confusions for the users. I don't insist on this going into 7.6, but will do my best if it does. Thanks looks like were not going to make it for 7.6 (I need to get blocker approval, and its too late to get that for this as its not function critical). I've fixed it upstream though, and will backport for 7,7 The messages now look correct in rng-tools-6.3.1-4.el7.x86_64: # rngd -f -d -x 1 -x 2 -x 5 Disabling 1: TPM RNG Device Disabling 2: Intel RDRAND Instruction RNG Disabling 5: JITTER Entropy generator Initalizing available sources Initalizing entropy source Hardware RNG Device ^ here Setting verified. 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/RHBA-2019:2338 |