Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 783857 Details for
Bug 850994
sys-apps/openrc-0.44.10: urandom service doesn't save random seed on linux kernel 5.18
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
temporary fix for 0.44
openrc-0.44.10-urandom-pool-bits.patch (text/plain), 1.10 KB, created by
Hunor Csordás
on 2022-06-10 11:54:24 UTC
(
hide
)
Description:
temporary fix for 0.44
Filename:
MIME Type:
Creator:
Hunor Csordás
Created:
2022-06-10 11:54:24 UTC
Size:
1.10 KB
patch
obsolete
>urandom: save seed even if random pool size is less than 4096 bits > >Linux 5.18 replaced the LFSR used for entropy extraction with BLAKE2s, >which reduced the entropy pool size from 4096 to 256 bits. >init.d/urandom extracts the seed to save in 512-byte chunks, rounding down >when calculating the number of chunks to save, resulting in no random seed >being saved on these kernels. Fix the init script by reading a single >variable-sized chunk from /dev/urandom. > >Signed-off-by: Hunor Csordás <csordas.hunor@gmail.com> > >--- openrc-0.44.10/init.d/urandom.in.orig 2022-06-10 12:58:17.432472085 +0200 >+++ openrc-0.44.10/init.d/urandom.in 2022-06-10 13:15:59.263851886 +0200 >@@ -21,15 +21,15 @@ > > save_seed() > { >- local psz=1 >+ local psz=512 > > if [ -e /proc/sys/kernel/random/poolsize ]; then >- : $(( psz = $(cat /proc/sys/kernel/random/poolsize) / 4096 )) >+ : $(( psz = $(cat /proc/sys/kernel/random/poolsize) / 8 )) > fi > > ( # sub shell to prevent umask pollution > umask 077 >- dd if=/dev/urandom of="$urandom_seed" count=${psz} 2>/dev/null >+ dd if=/dev/urandom of="$urandom_seed" bs=${psz} count=1 2>/dev/null > ) > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 850994
: 783857