Wrong /dev/hwrng for non-existing generator

Bug #1681832 reported by Hadmut Danisch on 2017-04-11
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)

Bug Description


just ran into a problem:

I have some software dealing with openssl and some crypto stuff. I recently extended it to read bytes from /dev/hwrng if it exists, because the software should run on a Raspberry Pi as well. The Raspi does not have a clock and usually no user input, thus lack of randomness, but a hardware random number generator, so it is necessary to use /dev/hwrng if it exists.

But now the software aborts on regular (intel) PCs, since my regular Ubuntu PCs get a /dev/hwrng entry as well, which just throws a „no such device“ error when trying to read.

For some strange reason there is this device entry even if the device is not present, causing trouble.

/dev/hwrng should exist only if there is really some hardware generator.

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: udev 231-9ubuntu3
ProcVersionSignature: Ubuntu 4.8.0-45.48-generic 4.8.17
Uname: Linux 4.8.0-45-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.20.3-0ubuntu8.2
Architecture: amd64
CurrentDesktop: XFCE
CustomUdevRuleFiles: 50-usb-hbox.rules 50-net-hbox.rules 70-snap.core.rules
Date: Tue Apr 11 14:17:28 2017
InstallationDate: Installed on 2016-04-22 (353 days ago)
InstallationMedia: Lubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420)
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 004: ID 0bda:0821 Realtek Semiconductor Corp.
 Bus 001 Device 003: ID 046d:c31d Logitech, Inc. Media Keyboard K200
 Bus 001 Device 002: ID 046d:c05b Logitech, Inc. M-U0004 810-001317 [B110 Optical USB Mouse]
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: To Be Filled By O.E.M. To Be Filled By O.E.M.
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.8.0-45-generic root=UUID=d0b47754-d5ca-49ec-8190-92a24e58e373 ro rootflags=subvol=@ nosplash noplymouth nomodeset text
SourcePackage: systemd
UpgradeStatus: Upgraded to yakkety on 2016-10-17 (176 days ago)
dmi.bios.date: 03/16/2016
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: P1.50
dmi.board.name: N3150-NUC
dmi.board.vendor: ASRock
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrP1.50:bd03/16/2016:svnToBeFilledByO.E.M.:pnToBeFilledByO.E.M.:pvrToBeFilledByO.E.M.:rvnASRock:rnN3150-NUC:rvr:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.name: To Be Filled By O.E.M.
dmi.product.version: To Be Filled By O.E.M.
dmi.sys.vendor: To Be Filled By O.E.M.

Hadmut Danisch (hadmut) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers