AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 19 Bitcoin

common: seed deterministic RNG from basename of argv0, not full path

Public commit record

What the developer wrote

Authored by ShahanaFarooqui

95/100 · Strong
common: seed deterministic RNG from basename of argv0, not full path

dev_override_randbytes() hashes argv0 into the CLN_DEV_ENTROPY_SEED
stream, so every plugin and subdaemon gets a distinct seed. But
lightningd execs them with absolute paths, so the "deterministic"
stream silently depended on where the source tree was checked out:
canned blocks generated in one directory would not replay in another
(funding tx output order and nlocktime fuzz diverge, so txids change).
This is why check-doc-examples passed locally but failed in CI.

Hash only the basename: binaries still get distinct seeds, but the
stream no longer depends on the checkout path.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
The short version

What changed, and why it matters

This change fixes a test-flakiness bug in a developer-only random-number override used during testing. It makes the random stream depend only on the program name, not the full file path, so tests produce the same results on different computers. It is not a security vulnerability fix.

Recommended action

No security action required; treat as normal code/test reliability fix.

Security signals we found

01

No security-relevant signal: change is in a developer override for deterministic testing RNG

02

No memory safety, authentication, authorization, or cryptographic weakness introduced

03

No incident or vulnerability disclosure referenced

Risk score

Why this scored 19/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 2/15
Confidence 9/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.