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

ccan: update to get json_escape_unescape_len()

Public commit record

What the developer wrote

Authored by Matt Whitlock

68/100 · Adequate
ccan: update to get json_escape_unescape_len()

See: https://github.com/rustyrussell/ccan/pull/123
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit updates a bundled helper library (CCAN) used by Core Lightning, mainly adding a new function that can unescape JSON strings of a known length rather than relying on null-terminated strings. The change also hardens the unescape logic so malformed escape sequences (for example, a backslash at the very end of the string) are rejected instead of reading past the end of the buffer. There is no direct evidence in the commit that this fixes an exploitable vulnerability in Core Lightning itself, but it is a defensive improvement that removes a potential out-of-bounds read and adds safer memory handling.

Recommended action

Treat as a routine defensive library update. Review whether any Core Lightning callers that currently use json_escape_unescape() with externally supplied JSON should migrate to json_escape_unescape_len() to eliminate reliance on null termination. No emergency action is indicated by this commit alone.

Security signals we found

01

Bounds check added after backslash before reading next character

02

Malformed trailing backslash now returns failure instead of reading past buffer

03

Stolen input is freed on error paths to avoid leaks/double-free issues

04

Output buffer is resized to actual decoded length

05

New length-aware unescape API added, but no in-tree callers shown in diff

Risk score

Why this scored 34/100

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