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

aes: add missing length check for multi-chunk encrypt/decrypt, with tests

Public commit record

What the developer wrote

Authored by Jon Griffiths

75/100 · Adequate
aes: add missing length check for multi-chunk encrypt/decrypt, with tests

Reported-by: Efstratios Kaplanellis (@5tratan) of Almamater Technologies
✓ Specific, 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 fixes a missing safety check in libwally-core's AES encryption/decryption function. Previously, callers could pass an output buffer smaller than the input data, which could lead to writing past the end of the buffer (a buffer overflow). The patch now rejects such calls and adds tests for many invalid input combinations. The issue was reported by an outside security researcher.

Recommended action

Treat as a security fix and include in release notes. Users should upgrade to a version containing this commit. Developers using libwally's AES API should ensure output buffers are at least as large as input data and block-aligned.

Security signals we found

01

Missing length check enabling potential buffer overflow

02

Out-of-bounds write risk in symmetric crypto routine

03

Reported by independent external researcher

04

Patch adds explicit output-size validation

05

New negative test cases for invalid arguments

Risk score

Why this scored 47/100

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