Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 850994 - sys-apps/openrc-0.44.10: urandom service doesn't save random seed on linux kernel 5.18
Summary: sys-apps/openrc-0.44.10: urandom service doesn't save random seed on linux ke...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-06-10 11:54 UTC by Hunor Csordás
Modified: 2024-02-17 06:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
temporary fix for 0.44 (openrc-0.44.10-urandom-pool-bits.patch,1.10 KB, text/plain)
2022-06-10 11:54 UTC, Hunor Csordás
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hunor Csordás 2022-06-10 11:54:24 UTC
Created attachment 783857 [details]
temporary fix for 0.44

After upgrading to linux kernel 5.18, the urandom service no longer saves any entropy when stopped (the created /var/lib/misc/random-seed file is empty). This is because the random pool size was reduced to 256 bits in 5.18 when the entropy collector method was changed, while the service script seems to assume the random pool size is always a multiple of 4096 bits.

The problem is (perhaps incidentally) fixed in openrc-0.45 by using the new seedrng service on linux, which doesn't suffer from this problem. Until 0.45 can be stabilized, the attached patch be used to restore the previous functionality.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-10 12:00:50 UTC
I suspect we'd probably prefer to get 0.45 fixed and unmasked but we'll see what William thinks.

(Should be a quick job to fix 0.45, hopefully. Definitely deliberately fixed in 0.45, as zx2c4 was the person who did it.)
Comment 2 William Hubbs gentoo-dev 2022-06-10 16:19:43 UTC
I don't think this fix for 0.44.x would qualify for fast stabilization,
so you will be waiting 30 days for a new release to hit stable for
either 0.44.x or 0.45.x.

OpenRC 0.45.1 has been released and should resolve this issue.