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

common/test: Add a test to trigger the bug

Public commit record

What the developer wrote

Authored by Chandra Pratap

70/100 · Adequate
common/test: Add a test to trigger the bug

Add a test in `common/test/run-wireaddr.c` that reproduces the
out-of-bounds error when the fix is not applied.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit adds a unit test that reproduces a one-byte buffer overflow when Core Lightning decodes a very long DNS network address. The test itself does not fix the bug; it only demonstrates it so that a separate fix can be verified. The overflow happens because the decoder tries to add a null terminator one byte past the end of a 255-byte address buffer.

Recommended action

Verify that a separate commit contains the actual fix for fromwire_wireaddr() before treating this as resolved. Run the new test under UBSan/ASan to confirm the overflow and ensure the fix eliminates it. Review other fixed-size buffers in wireaddr handling for similar off-by-one terminator issues.

Security signals we found

01

Out-of-bounds write in fromwire_wireaddr() for DNS addresses

02

One-byte overflow on a 255-byte fixed buffer

03

Regression test added to reproduce UBSan error

04

Test links real wire serialization objects instead of mocks

Risk score

Why this scored 45/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 6/15
Affected reach 7/15
Confidence 8/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.