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

fix(core): truncate BLE name before invoking `ble_enter_pairing_mode()`

Public commit record

What the developer wrote

Authored by Roman Zeyde

77/100 · Adequate
fix(core): truncate BLE name before invoking `ble_enter_pairing_mode()`

Also, truncate when calling `switch_on()`.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit fixes a bug in the Trezor hardware wallet's Bluetooth handling. Previously, the device name sent to the Bluetooth chip when entering pairing mode or switching Bluetooth on was not truncated to the maximum allowed length. This could cause the Bluetooth stack to receive an oversized name, potentially leading to unstable behavior, pairing failures, or memory corruption in the Bluetooth firmware. The fix ensures the name is shortened to the advertised-name limit before being passed along.

Recommended action

Treat as a low-to-moderate security hardening fix. Verify that ADV_NAME_LEN matches the BLE controller's maximum advertising name length and that prefix_utf8_bytes() does not split a multi-byte UTF-8 codepoint. Consider auditing other FFI call sites for similar missing length checks.

Security signals we found

01

Buffer-size limit enforcement added for untrusted-length string input

02

Direct unsafe FFI call replaced with safer wrapper that performs truncation

03

Changelog describes fix as 'Truncate device name on BLE pairing'

04

Two entry points (pairing and power-on) both patched for consistency

Risk score

Why this scored 34/100

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