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

fix(core/monero): validate change address on sweep transactions

Public commit record

What the developer wrote

Authored by Petr Susil

100/100 · Strong
fix(core/monero): validate change address on sweep transactions

The sweep shape (declared change amount 0, two outputs) is exempt from
the change ownership check, because on a sweep the change address is a
random throwaway address, not ours. But the shape is host-controlled, so
a malicious host can point change_dts.addr at the paying recipient and
have the exemption accept it. That output is then keyed as change in
step 6, derived from our own view key (a*R), leaving it unspendable by
both the recipient and the owner.

Reject the aliasing: an address we decline to validate must never be the
address of an output that carries money. Honest sweeps are unaffected --
their fake output carries amount 0.

Fixes: https://github.com/trezor/trezor-firmware/issues/7544
(cherry picked from commit ea6caf1e1875df05e983629df90d3dd217af4ab9)
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ 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 update fixes a bug in how Trezor handles certain Monero 'sweep' transactions. In a sweep, one output is a fake zero-value decoy with a random address, and the device normally skips checking that the change address belongs to the wallet. A malicious computer app could exploit that skip by claiming the real payment recipient's address is the change address. The device would then encrypt the recipient's output using the wallet's own secret view key, making the money effectively unspendable by the recipient and unrecoverable by the sender. The fix adds a check: if the unvalidated change address appears on any output that actually carries money, the transaction is rejected. Honest sweeps, where the decoy carries zero coins, still work normally.

Recommended action

Apply this patch and ensure firmware releases include it. Users who signed Monero sweep transactions with older firmware should verify that recipients could spend outputs; if not, recovery may require the sender's private view key. Wallet software interacting with Trezor should be updated to enforce the new behavior.

Security signals we found

01

Missing validation of host-controlled change address in sweep exemption path

02

Potential keying of a recipient output with the wallet's own view key (a*R), rendering funds unspendable

03

Subaddress recipient additionally loses required ADDITIONAL_PUBKEYS if misclassified as change

04

Fix adds an address-equality guard before accepting the sweep exemption

05

Comprehensive unit tests added for the vulnerable branch

Risk score

Why this scored 74/100

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