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

da14531: validate HWW BLE payload length

Public commit record

What the developer wrote

Authored by benma's agent

68/100 · Adequate
da14531: validate HWW BLE payload length

The BLE HWW path previously relied on ASSERT(payload_length == 64),
which is compiled out in release builds.

Enforce the expected USB HID report size at runtime and drop malformed
frames so usb_packet_process() never consumes stale/partial payload
bytes. Also include the headers that define USB_REPORT_SIZE and
USB_FRAME explicitly.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in the Bluetooth Low Energy (BLE) handling code for the BitBox02 hardware wallet. Previously, the code assumed incoming data packets were exactly 64 bytes long, but that size check was removed in release builds. If a malformed or partial packet arrived, the device could process leftover or incorrect data. The fix adds a runtime length check and drops any packet that is not the expected size before it is passed further into the system.

Recommended action

Treat this as a security-hardening fix and include it in the next firmware release. Review other ASSERT-only length checks in BLE and USB paths to ensure they have runtime enforcement. Consider whether malformed frames could be triggered by an attacker and add fuzzing or boundary tests for the BLE HWW interface.

Security signals we found

01

Missing runtime validation of external input length

02

Assertion used as sole security/integrity check and compiled out in release builds

03

Potential processing of malformed/partial BLE frames

04

Fix explicitly prevents stale/partial payload consumption

Risk score

Why this scored 63/100

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