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

i18n: persist and expose device language

Public commit record

What the developer wrote

Authored by Sebastian Sutter

68/100 · Adequate
i18n: persist and expose device language

Retain the selected language across reboots using a reserved
settings byte, with English as the default for existing devices.

Expose it through the HAL. bitbox02-rust adds translation macros
with catalog checks and localized dates; bitbox02 provides a
UTF-8-safe copy bridge for C using the same translation core.

Implement the host language request with confirmation in the
current language before storing the change. Report the current and
supported languages in device info and expose them in the Python
API.

Generate the supported-language list alongside the translation
tables from their locale configuration, keeping the advertised
languages in sync with the compiled catalogs.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds the ability to choose a device language (English or German) and remember it after reboot. It also lets a connected computer read the current language and list supported languages. The change requires the user to confirm on the device before switching languages, and it rejects unknown language codes. There is no direct evidence in the commit of a security vulnerability, but any new command that writes to device memory deserves a careful look for input validation and memory-safety issues.

Recommended action

Review the new `set_device_language` handler for TOCTOU and confirmation-bypass paths, verify that the C memory chunk write cannot corrupt adjacent fields, and audit `rust_i18n_translate_copy` callers for correct output buffer sizing. Treat as a normal feature commit unless additional context links it to a security issue.

Security signals we found

01

New host-facing command writes persistent device settings

02

Input validation rejects unsupported language codes with InvalidInput

03

User confirmation is required before persisting language change

04

Memory write uses a single reserved byte with enumerated values

05

New unsafe FFI copy helper handles null pointers and UTF-8 truncation

06

No security relevance, CVE, or researcher attribution in commit or references

Risk score

Why this scored 23/100

Our methodology →
Potential impact 2/30
Exploitability 3/25
Stealth signal 2/15
Affected reach 4/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.