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

Merge pull request #666 from Foundation-Devices/fix/quirc-grid-bounds

Public commit record

What the developer wrote

Authored by Jacksper13

58/100 · Thin
Merge pull request #666 from Foundation-Devices/fix/quirc-grid-bounds

Reject oversized QR grids in quirc
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
The short version

What changed, and why it matters

This update hardens the QR-code scanner library (quirc) used in the Passport hardware wallet so it refuses to process impossibly large QR grids and no longer reads past the end of its internal buffer when a malformed QR code is presented. It also fixes an off-by-one bug in grid indexing. The changes are defensive: they prevent memory corruption and crashes when scanning deliberately crafted or corrupted QR codes, rather than changing normal wallet behavior.

Recommended action

Treat this as a security hardening fix and include it in the next firmware release. Run the new quirc unit tests in CI (already added) and consider fuzzing quirc_decode/quirc_extract with mutated QR inputs to find related bounds issues. Review other quirc callers to ensure no path bypasses the new checks.

Security signals we found

01

Buffer overflow / out-of-bounds write prevention in quirc_extract()

02

Off-by-one fix in grid index validation (index > num_grids -> index >= num_grids)

03

Input validation in quirc_decode() rejecting oversized QR grids

04

Version clamping in measure_timing_pattern() to ISO/IEC 18004 version range 1-40

05

New regression tests with AddressSanitizer/UndefinedBehaviorSanitizer canaries

Risk score

Why this scored 60/100

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