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

Fix crash in `SerializedSignature` formatting

Public commit record

What the developer wrote

Authored by Martin Habovstiak

68/100 · Adequate
Fix crash in `SerializedSignature` formatting

The formatting function was calling `fmt_hex_exact!` macro which
requires exact buffer size rather than minimum buffer size causing it to
crash since the length of `SerializedSignature` is conditional.

This fixes it by simply conditionally calling the macro with appropriate
values.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a crash when printing or formatting a Taproot serialized signature. The old code assumed every signature was the maximum possible length, but real signatures can be shorter. When a shorter signature was formatted, the code could panic or crash. The fix checks the actual length and formats with the correct size.

Recommended action

Upgrade to the fixed commit. If upgrading is not possible, avoid formatting or serializing SerializedSignature values for untrusted inputs, and audit callers that invoke Display/Debug/to_hex on Taproot signatures.

Security signals we found

01

Denial-of-service vector: formatting a shorter SerializedSignature could panic

02

Incorrect buffer-size assumption in hex formatting macro

03

Crash triggered via common traits (Display, LowerHex, UpperHex, Debug, to_hex)

04

No evidence of memory corruption or code execution

Risk score

Why this scored 44/100

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