Bug 2156554

Summary: [rngd-9.2] rngd fails during start with *** stack smashing detected ***
Product: Red Hat Enterprise Linux 9 Reporter: Vladis Dronov <vdronov>
Component: rng-toolsAssignee: Vladis Dronov <vdronov>
Status: CLOSED ERRATA QA Contact: Vilém Maršík <vmarsik>
Severity: high Docs Contact:
Priority: high    
Version: 9.2CC: asosedki, core-kernel-mgr, myllynen, vmarsik, vpolasek
Target Milestone: rcKeywords: Triaged
Target Release: 9.2   
Hardware: s390x   
OS: Linux   
Whiteboard:
Fixed In Version: rng-tools-6.15-3.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 08:15:43 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 Vladis Dronov 2022-12-27 14:05:21 UTC
update rng-tools to 6.15 @ cb8cc624. the previous bugzilla is bz2124605.

the related bugzilla (fixing a crash) is bz2140043.

Comment 11 Vilém Maršík 2023-01-09 22:40:23 UTC
Yes, but first will test it a little to check that rngd still works.

Comment 12 Alexander Sosedkin 2023-01-10 16:45:59 UTC
*** Bug 2154804 has been marked as a duplicate of this bug. ***

Comment 13 Vilém Maršík 2023-01-25 23:53:11 UTC
Reproduced with jitterentropy-3.4.1-1.el9.s390x and rng-tools-6.15-2.el9.s390x, verified with rng-tools-6.15-3.el9.s390x.rpm and jitterentropy-3.4.1-2.el9.s390x.rpm :

# uname -r
5.14.0-242.el9.s390x
# cat /etc/redhat-release 
Red Hat Enterprise Linux release 9.2 Beta (Plow)
# dnf install rng-tools
(...)
Installed:
  jitterentropy-3.4.1-1.el9.s390x
  rng-tools-6.15-2.el9.s390x
Complete!
# systemctl start rngd
# grep rngd /var/log/messages
Jan 25 12:23:23 ibm-z-536 dracut[1286]: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
Jan 25 12:23:24 ibm-z-536 dracut[1286]: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
Jan 25 18:42:41 ibm-z-536 rngd[79567]: Disabling 7: PKCS11 Entropy generator (pkcs11)
Jan 25 18:42:41 ibm-z-536 rngd[79567]: Disabling 5: NIST Network Entropy Beacon (nist)
Jan 25 18:42:41 ibm-z-536 rngd[79567]: Disabling 9: Qrypt quantum entropy beacon (qrypt)
Jan 25 18:42:41 ibm-z-536 rngd[79567]: Initializing available sources
Jan 25 18:42:41 ibm-z-536 rngd[79567]: [hwrng ]: Initialized
Jan 25 18:42:41 ibm-z-536 rngd[79567]: [jitter]: JITTER timeout set to 5 sec
Jan 25 18:42:41 ibm-z-536 rngd[79567]: *** stack smashing detected ***: terminated
Jan 25 18:42:41 ibm-z-536 systemd-coredump[79569]: Resource limits disable core dumping for process 79567 (rngd).
Jan 25 18:42:41 ibm-z-536 systemd-coredump[79569]: Process 79567 (rngd) of user 0 dumped core.
Jan 25 18:42:41 ibm-z-536 systemd[1]: rngd.service: Main process exited, code=dumped, status=6/ABRT
Jan 25 18:42:41 ibm-z-536 systemd[1]: rngd.service: Failed with result 'core-dump'.

# rpm -U rng-tools-6.15-3.el9.s390x.rpm jitterentropy-3.4.1-2.el9.s390x.rpm
# systemctl stop rngd
# systemctl start rngd
# systemctl status rngd
● rngd.service - Hardware RNG Entropy Gatherer Daemon
     Loaded: loaded (/usr/lib/systemd/system/rngd.service; enabled; preset: enabled)
     Active: active (running) since Wed 2023-01-25 18:46:39 EST; 5s ago
   Main PID: 79888 (rngd)
      Tasks: 3 (limit: 36540)
     Memory: 1.5M
        CPU: 10.715s
     CGroup: /system.slice/rngd.service
             └─79888 /usr/sbin/rngd -f --fill-watermark=0 -x pkcs11 -x nist -x qrypt -D daemon:daemon

Jan 25 18:46:39 ibm-z-536.lab.eng.rdu2.redhat.com rngd[79888]: Disabling 7: PKCS11 Entropy generator (pkcs11)
Jan 25 18:46:39 ibm-z-536.lab.eng.rdu2.redhat.com rngd[79888]: Disabling 5: NIST Network Entropy Beacon (nist)
Jan 25 18:46:39 ibm-z-536.lab.eng.rdu2.redhat.com rngd[79888]: Disabling 9: Qrypt quantum entropy beacon (qrypt)
Jan 25 18:46:39 ibm-z-536.lab.eng.rdu2.redhat.com rngd[79888]: Initializing available sources
Jan 25 18:46:39 ibm-z-536.lab.eng.rdu2.redhat.com rngd[79888]: [hwrng ]: Initialized
Jan 25 18:46:39 ibm-z-536.lab.eng.rdu2.redhat.com rngd[79888]: [jitter]: JITTER timeout set to 5 sec
Jan 25 18:46:39 ibm-z-536.lab.eng.rdu2.redhat.com rngd[79888]: [jitter]: Initializing AES buffer
Jan 25 18:46:42 ibm-z-536.lab.eng.rdu2.redhat.com rngd[79888]: [jitter]: Enabling JITTER rng support
Jan 25 18:46:42 ibm-z-536.lab.eng.rdu2.redhat.com rngd[79888]: [jitter]: Initialized
Jan 25 18:46:42 ibm-z-536.lab.eng.rdu2.redhat.com rngd[79888]: Process privileges have been dropped to 2:2

Comment 15 errata-xmlrpc 2023-05-09 08:15:43 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 (rng-tools bug fix and enhancement update), 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-2023:2473