CRYP-7902 excessively slow on Linux 6.x kernels with haveged running
CRYP-7902 consistently takes over 6 minutes to complete (368.423856 seconds),
triggering a long-execution warning, despite the system having a healthy entropy setup.
Environment
- Lynis version: 3.1.6
- OS: Debian 13
- Kernel: 6.12.74+deb13+1-amd64
- Entropy daemon: haveged
Describe the issue
CRYP-7902 consistently takes over 6 minutes to complete (368.423856 seconds),
triggering a long-execution warning, despite the system having a healthy entropy setup.
Log output
# lynis audit system --quiet
[WARNING]: Test HTTP-6708 had a long execution: 11.248315 seconds
[WARNING]: Test CRYP-7902 had a long execution: 368.423856 secondsRelevant system state
$ cat /proc/sys/kernel/random/entropy_avail
256
$ ps aux | grep haveged
root 683 0.0 0.0 8520 680 ? Ss Mar30 0:51 /usr/sbin/haveged --Foreground --verbose=1Analysis
On Linux kernel 5.6+, /dev/random no longer blocks regardless of entropy pool state,
and the kernel intentionally caps entropy_avail at 256 bits (the CRNG is considered
fully seeded at this level). The test appears to be running a legacy entropy estimation
loop that predates this kernel behavior change, causing it to spin for several minutes
before completing.
Expected behavior
CRYP-7902 should complete in a reasonable time on kernels 5.6+ where /dev/random
is non-blocking by design.
Suggested fix
Consider adding a kernel version check in CRYP-7902 — on kernels >= 5.6, the test logic or timeout threshold may need to be adjusted to account for the new CRNG behavior.
Source: CISOfy/lynis