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

fix(core): fix OOB read in NFC card emulation

Public commit record

What the developer wrote

Authored by tychovrahe

57/100 · Thin
fix(core): fix OOB read in NFC card emulation

[no changelog]
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes several out-of-bounds (OOB) memory reads in the NFC card emulation code used in Trezor hardware wallets. The code previously trusted the length and content of NFC commands received from a nearby reader without checking whether the received data was actually long enough. A malicious or malformed NFC reader could send a truncated or specially crafted command, causing the device to read memory past the end of the command buffer. The patch adds length checks before accessing command bytes and before looping over variable-length block lists.

Recommended action

Treat as a security fix and include in release notes/changelog despite the [no changelog] tag. Review whether the same patterns exist in other NFC emulation files or upstream ST25 reference code. Verify that callers always supply a correct rxDataLen and that the lower-level NFC stack cannot deliver a length larger than the buffer. Consider fuzzing the NFC command parsers with truncated and malformed frames.

Security signals we found

01

Out-of-bounds read in NFC command parser

02

Missing length validation on attacker-controlled NFC frames

03

cmd_compare searched up to 20 bytes regardless of actual command length

04

T3T block-list parsing read block element bytes without checking remaining length

05

T4T read/update accessed fixed offsets without verifying frame length

06

T4T update copied declared-length payload without verifying payload present

Risk score

Why this scored 68/100

Our methodology →
Potential impact 18/30
Exploitability 16/25
Stealth signal 12/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.