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

Security Hardening (#851)

Public commit record

What the developer wrote

Authored by Odudex

83/100 · Strong
Security Hardening (#851)

* fix: enforce minimum PBKDF2 iterations in kef.unwrap

A malicious envelope could declare iterations=0 and bypass key
stretching. Reject any envelope below 10000 iterations.

* fix: reject multiple origin-less xpubs in multi-key descriptors

Previously a second origin-less key would silently overwrite the first,
losing cosigner identity. Only the single taproot internal-key
exception remains allowed.

* fix: filter traversal entries from SD listings in file manager

A malicious or corrupted SD card could return names like ".", ".." or entries containing path separators which, concatenated into a path, would allow escaping the current directory. Drop those entries from os.listdir results. The intended ".." up-navigation is unaffected because it is added explicitly by the page.

* fix: add in-session backoff on KEF decryption failures

Track failed KEF decrypt attempts in a RAM-only class counter and sleep with exponentially growing delay (1s, 2s, 4s, capped at 30s) before each new attempt. Reset on success. A power cycle clears the counter, an accepted trade-off to slow interactive brute forcing without writing lockout state to flash.
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes four security weaknesses in Krux, a Bitcoin hardware-wallet project. The changes prevent: (1) encrypted backups from declaring zero or very low password-stretching effort, which would make them easy to brute-force; (2) multi-signature wallet descriptors from silently accepting multiple cosigners whose identity cannot be verified; (3) a malicious or corrupted SD card from tricking the file manager into leaving its intended folder; and (4) repeated wrong password attempts on encrypted backups by adding growing delays between attempts. All four are hardening fixes rather than a single critical vulnerability.

Recommended action

Treat this as a security update and include it in the next release. Users who create or load encrypted backups, use multi-signature descriptors, or browse files from SD cards should upgrade. No immediate external incident response is indicated, but the PBKDF2 and descriptor issues are the most severe because they weaken cryptographic assurances.

Security signals we found

01

Minimum PBKDF2 iteration enforcement against trivial work-factor envelopes

02

Rejection of multiple origin-less xpubs in multi-key descriptors

03

SD file-list filtering of traversal entries ('.', '..', path separators)

04

In-session exponential backoff on KEF decryption failures

05

CHANGELOG explicitly labels all four items as security hardening

Risk score

Why this scored 74/100

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