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

fix(core): give USB EP0 receptions a full-packet buffer

Public commit record

What the developer wrote

Authored by tychovrahe

85/100 · Strong
fix(core): give USB EP0 receptions a full-packet buffer

- the OTG core accepts a full packet on EP0 OUT however short the armed
length; the stack armed the status stage with a NULL buffer and VCP
received class requests into an 8-byte one, so a host could make the
HAL write through NULL or past the VCP buffer
- receive all of them into a packet-sized buffer in the device handle

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a USB memory-safety bug in Trezor hardware wallets. When the device expected no data during the final 'status' handshake of a USB control transfer, it told the USB hardware to write incoming bytes to address zero (NULL) or into an 8-byte command buffer. The USB hardware can actually deliver a full 64-byte packet regardless of what length was requested, so a malicious or misbehaving USB host could make the device write memory past the intended location or through the NULL pointer, causing a crash or potentially worse. The fix gives every such reception a dedicated 64-byte buffer inside the device handle.

Recommended action

Treat this as a security fix and include it in the next firmware release. Users should update Trezor firmware, bootloader, and prodtest to a version containing this commit. Hardware-wallet vendors relying on the same STM32 USB stack should audit similar EP0 OUT buffer handling. No CVE or advisory is present in the supplied materials, so one may be assigned if the project chooses to publish a security advisory.

Security signals we found

01

NULL-pointer write on USB EP0 OUT reception

02

Buffer overflow on USB EP0 OUT reception due to hardware accepting full packet despite armed length

03

Memory corruption vector reachable from USB host without authentication

04

Fix affects bootloader and prodtest as well as core firmware

05

Changelog frames issue as a crash fix for unexpected USB status-stage data

Risk score

Why this scored 77/100

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