Skip to contentSkip to conversation

rng-tools: Fix crazy defaults

PATCH In review Hongxu Jia 3 participants 4 messages Nov 9, 2018 – Mar 5, 2019

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

PATCH 1/1 rng-tools: Fix crazy defaults

Since commit [f1dc9ac rng-tools: Fix crazy defaults] fixed init based on sysvinit, this fix rngd.service based on systemd.

---
 meta/recipes-support/rng-tools/rng-tools/rngd.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/rng-tools/rng-tools/rngd.service +1 -1
index cb81024..f0355db 100644
@@ -5,7 +5,7 @@ After=systemd-udev-settle.service
 Before=sysinit.target
 
 [Service]
-ExecStart=@SBINDIR@/rngd -f -r /dev/urandom
+ExecStart=@SBINDIR@/rngd -f -r /dev/hwrng
 SuccessExitStatus=66
 
 [Install]
Signature · 1 line
2.7.4
#1 lore raw
Quoted 14 lines · Hongxu Jia

Since commit [f1dc9ac rng-tools: Fix crazy defaults] fixed init based on sysvinit, this fix rngd.service based on systemd.

---
 meta/recipes-support/rng-tools/rng-tools/rngd.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/rng-tools/rng-tools/rngd.service +0 -0
index cb81024..f0355db 100644

meta/recipes-support/rng-tools/rng-tools/rngd.service After=systemd-udev-settle.service · line 11

Quoted 8 lines
meta/recipes-support/rng-tools/rng-tools/rngd.service +1 -1
@@ -5,7 +5,7 @@ After=systemd-udev-settle.service
 Before=sysinit.target
 
 [Service]
-ExecStart=@SBINDIR@/rngd -f -r /dev/urandom
+ExecStart=@SBINDIR@/rngd -f -r /dev/hwrng
 SuccessExitStatus=66
 
 [Install]

This has been applied to master, but please apply this to thud as well - feeding the kernel's entropy pool from that same entropy pool is of course utter nonsense, but since rngd is also _crediting those bytes with providing real bits of entropy_ (ioctl RNDADDENTROPY) makes it a security issue.

Rasmus

#2 lore raw
In reply to Hongxu Jia
Quoted 14 lines · Hongxu Jia

Since commit [f1dc9ac rng-tools: Fix crazy defaults] fixed init based on sysvinit, this fix rngd.service based on systemd.

---
 meta/recipes-support/rng-tools/rng-tools/rngd.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/rng-tools/rng-tools/rngd.service +0 -0
index cb81024..f0355db 100644

meta/recipes-support/rng-tools/rng-tools/rngd.service After=systemd-udev-settle.service · line 11

Quoted 8 lines
meta/recipes-support/rng-tools/rng-tools/rngd.service +1 -1
@@ -5,7 +5,7 @@ After=systemd-udev-settle.service
 Before=sysinit.target
 
 [Service]
-ExecStart=@SBINDIR@/rngd -f -r /dev/urandom
+ExecStart=@SBINDIR@/rngd -f -r /dev/hwrng
 SuccessExitStatus=66
 
 [Install]

This has been applied to master, but please apply this to thud as well - feeding the kernel's entropy pool from that same entropy pool is of course utter nonsense, but since rngd is also _crediting those bytes with providing real bits of entropy_ (ioctl RNDADDENTROPY) makes it a security issue.

Rasmus

#3 lore raw
Quoted 8 lines · Rasmus Villemoes
Quoted 7 lines · Hongxu Jia

Before=sysinit.target

[Service]

meta/recipes-support/rng-tools/rng-tools/rngd.service +1 -1
-ExecStart=@SBINDIR@/rngd -f -r /dev/urandom
+ExecStart=@SBINDIR@/rngd -f -r /dev/hwrng
 SuccessExitStatus=66
Quoted 9 lines
Quoted 2 lines

[Install]

This has been applied to master, but please apply this to thud as well -
feeding the kernel's entropy pool from that same entropy pool is of course utter nonsense, but since rngd is also _crediting those bytes with providing real bits of entropy_ (ioctl RNDADDENTROPY) makes it a security issue.

Thanks for pointing this out, I've backported this to thud after discussion with Armin.

Cheers,

Richard