β¬’ DragonFlyBSD Kernel Audit
← triage Β· dashboard
DF-2406

No RDRAND online health tests (NIST SP 800-90B repetition / adaptive-proportion)

Summary

rdrand_rng_harvest feeds RDRAND output directly into CSPRNG pool with no per-source health checks (no repetition-count test no adaptive-proportion test no startup/self-test). NIST SP 800-90B requires these noise-source health tests. Driver relies entirely on downstream L15/IBAA/csprng mixing for safety. rdrand_rng assembly performs no retry budget single CF=0 immediately terminates read so flaky RDRAND silently yields fewer bytes. In virtualized environment hostile hypervisor can intercept RDRAND return biased/attacker-chosen values with no health test driver has no way to detect. Design observation not demonstrable exploit. [VERIFIED pass2: source-confirmed absence of SP 800-90B health tests; RDRAND one mixed source so compliance hardening; recommendation only]

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-2406 Β· 7 files
FileTypeDescriptionSize
VERDICT.md β€” 1.6 KB ↓ raw
README.md β€” 248 B ↓ raw
build.sh β€” 85 B view raw
run.sh β€” 49 B view raw
env.txt β€” 314 B view raw
manifest.json β€” 598 B view raw
verdict.json β€” 2.0 KB view raw

DF-2406 evidence pack

  • finding: sys/dev/crypto/rdrand/rdrand.c (159-188)
  • verdict: reproduced (likely) - see VERDICT.md
  • source-only confirmation (no runtime PoC)
  • reproduce: build.sh / run.sh
  • fix.diff: documented recommendation (no diff)
VERDICT.md
↓ download raw

DF-2406 - Verification Verdict

Status: reproduced Impact: none (hardening) Confidence: likely

Mechanism

rdrand_rng_harvest performs no NIST SP 800-90B health tests (repetition count / adaptive proportion) on the harvested RDRAND stream before mixing it into the kernel pool.

Verdict

source-confirmed (no runtime PoC; deterministic code trace of the cited path:line in the read-only sys/ tree). Code-certain absence. Honest assessment: RDRAND is a self-tested on-chip DRBG (validated per SP 800-90A), the harvest is one entropy SOURCE among several mixed by add_buffer_randomness (not a sole-source RBG constructor), so the compliance gap is hardening, not a demonstrated weakness. No code fix authored - a documented recommendation: if rdrand is ever promoted to a sole/primary source, implement startup + continuous health tests per SP 800-90B 4.4 at the harvest site.

Threat / reachability

Latent code defect; see VERDICT.md.

Privilege escalation assessment

n/a (hardening)

Fix

Documented recommendation (no fix.diff): add SP 800-90B health tests if RDRAND becomes a primary entropy source.

Kernel references

Fix status (batch validation)

Applied with the 36 sibling fix.diffs of this batch in findings/poc/_batch41/all_fixes.patch; single in-guest make -j6 nativekernel KERNCONF=X86_64_GENERIC completed RC=0 with zero errors under -Werror (full log: findings/poc/_batch41/fix_build8.log). Behavior A/B intentionally skipped for this Info-tier item.

(No fix.diff for this item: documented recommendation only - see Fix above.)

Fix verification

not_testable

No fix.diff (documented recommendation in VERDICT.md): Documented recommendation (no fix.diff): add SP 800-90B health tests if RDRAND becomes a primary entropy source.

n/a (recommendation item)
per-fix-DF-2406

Confirmed kernel references

Detail

Exploit chain

no escalation path (Info-tier hardening; see VERDICT.md)

Evidence (decisive lines)

VERDICT.md mechanism/verdict sections; fix.diff

PoC changes

none (source-only confirmation for this Info-tier item)

Verified recommended fix

Documented recommendation (no fix.diff): add SP 800-90B health tests if RDRAND becomes a primary entropy source.

Verdict

source-confirmed (no runtime PoC; deterministic code trace of the cited path:line in the read-only sys/ tree). Code-certain absence. Honest assessment: RDRAND is a self-tested on-chip DRBG (validated per SP 800-90A), the harvest is one entropy SOURCE among several mixed by add_buffer_randomness (not a sole-source RBG constructor), so the compliance gap is hardening, not a demonstrated weakness. No code fix authored - a documented recommendation: if rdrand is ever promoted to a sole/primary source, implement startup + continuous health tests per SP 800-90B 4.4 at the harvest site.