Anonymous Intelligence Signal

Critical Kernel Vulnerability: Crypto RNG Fallback Is Deterministic, Undermines All Security

human The Lab unverified 2026-04-03 15:27:05 Source: GitHub Issues

A critical security vulnerability has been identified in a kernel's cryptographic random number generator (RNG). The system's fallback mechanism, designed to operate when the primary hardware RDRAND instruction is unavailable, is deterministic and predictable, rendering all cryptographic operations insecure. This flaw, designated as a P0-level audit finding, fundamentally compromises the kernel's cryptographic foundation, including key generation, nonces, and address-space layout randomization (KASLR).

The vulnerability resides in the `src/security/crypto/random.rs` file. The `init()` function is a no-op, failing to initialize any entropy pool. The critical failure occurs in `secure_random_u64()`. While it correctly attempts to use RDRAND first, its fallback path (lines 37-39) combines a predictable atomic counter with the Time Stamp Counter (TSC) and a constant XOR mask. The resulting output is deterministic based on the known TSC value and the call count, making it a completely non-cryptographically secure pseudorandom number generator (CSPRNG).

This flaw poses an extreme risk in environments where RDRAND is unavailable, such as on older CPUs or within certain virtual machines. In these scenarios, every cryptographic operation would rely on predictable values, allowing an attacker to potentially reverse-engineer keys or bypass security mechanisms. The recommended fix requires a complete overhaul: implementing proper entropy pool initialization in `init()` using multiple hardware entropy sources, and replacing the current fallback with a cryptographically secure software RNG.