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

epee: replace readline with linenoise

Public commit record

What the developer wrote

Authored by jpk68

60/100 · Adequate
epee: replace readline with linenoise

Co-authored-by: Thomas <thomas.giudici@proton.me>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit swaps Monero's command-line input library from GNU readline to a bundled, customized version of linenoise. The stated goal is to reduce external dependencies, but the change also removes several risky behaviors: bracketed-paste handling that could execute pasted commands, terminal control-character passthrough, and UTF-8 parsing that could read past buffer ends. The new code adds input sanitization, caps paste sizes, and makes Ctrl+C/\ signal handling more predictable. It is a large refactor, so it may introduce new bugs even while fixing old ones.

Recommended action

Treat this as a dependency-hardening change rather than a discrete vulnerability patch. Review the vendored linenoise.c diff for remaining terminal escape handling and signal races, run interactive wallet/daemon tests on TTY and piped input, and monitor for regressions in command history, completion, and pasted input behavior. Because the commit is large and replaces a mature library, consider fuzzing the linenoise input parser and auditing the new poll/select loops for deadlock or missed wakeups.

Security signals we found

01

Replaced external readline/ncurses with vendored linenoise to reduce attack surface

02

Removed bracketed-paste mode that can auto-submit pasted commands

03

Added control-character and C1-control sanitization in display and returned input

04

Hardened UTF-8 decoder with availability checks to prevent out-of-bounds reads

05

Capped line/paste length and added time-budgeted paste feeding

06

Changed terminal raw-mode flags to keep signal generation enabled and disable suspend

07

Applied C security hardening flags to the new linenoise target

Risk score

Why this scored 35/100

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