RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1211406 - rngd assume all entropy to be 8-bit
Summary: rngd assume all entropy to be 8-bit
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rng-tools
Version: 7.1
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Neil Horman
QA Contact: Vilém Maršík
URL: https://sourceforge.net/p/gkernel/bug...
Whiteboard:
Depends On:
Blocks: 1254223
TreeView+ depends on / blocked
 
Reported: 2015-04-13 23:10 UTC by Yi Hao
Modified: 2015-11-19 03:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 03:30:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch to add entropy count option (1.49 KB, patch)
2015-04-14 13:48 UTC, Neil Horman
no flags Details | Diff
stap probe (1.43 KB, text/plain)
2015-08-18 15:54 UTC, Vilém Maršík
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2179 0 normal SHIPPED_LIVE rng-tools bug fix update 2015-11-19 07:40:29 UTC

Description Yi Hao 2015-04-13 23:10:02 UTC
Description of problem:
random_add_entropy() hardcoded entropy count as 8 bit per byte. There is no known hardware entropy generator in the market that has 8 bit per byte of entropy.

Version-Release number of selected component (if applicable):
rng-tools-5-2.el7

How reproducible:
Every time

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
It would be better to use safer value such as 7 instead of 8. Alternatively, allow user to specify the entropy as command line parameter

Comment 2 Neil Horman 2015-04-14 13:48:04 UTC
Created attachment 1014318 [details]
patch to add entropy count option

Untested, please let me know if this works for you.  Thanks.

Comment 3 Yi Hao 2015-04-14 16:17:14 UTC
Hi,
Thanks for the patch.

if ((sscanf(arg,"%i", &e) == 0) || (e < 0) || (e > 8))
Actually should be (e < 1)
Missing manpage entry.

Other than that looks fine.

Comment 5 Vilém Maršík 2015-08-11 16:39:32 UTC
I cannot see the new switch documented in the man page (see Comment #3). Did it get lost during the process?

Comment 6 Neil Horman 2015-08-11 18:53:42 UTC
didn't add it to the documentation, I'll do that in a separate patch

Comment 7 Vilém Maršík 2015-08-18 15:53:38 UTC
Used a Systemtap probe to see what data are sent. From what I know about the entropy pool, it rather looks correct - kernel entropy count is increased by (number of data added) * (number you specified by '-e' option) :

rngd -f -e 1:
Tue Aug 18 15:13:03 2015 :: rngd
  ioctl("/dev/random", RNDADDENTROPY, {entropy_count = 64, buf_size= 64})
...

rngd -f -e 8:
Tue Aug 18 15:13:12 2015 :: rngd
  ioctl("/dev/random", RNDADDENTROPY, {entropy_count = 512, buf_size= 64})
...

Comment 8 Vilém Maršík 2015-08-18 15:54:54 UTC
Created attachment 1064370 [details]
stap probe

thanks to Jeffrey Bastian and Will Cohen

Comment 10 errata-xmlrpc 2015-11-19 03:30:51 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, 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://rhn.redhat.com/errata/RHBA-2015-2179.html


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