Skip to content

fix: reject IBC transfers sent from internal addresses in the IBC VP (backport #5052) - #5060

Merged
sug0 merged 2 commits into
maint-201.0from
mergify/bp/maint-201.0/pr-5052
Oct 6, 2026
Merged

sug0 merged 2 commits into
maint-201.0from
mergify/bp/maint-201.0/pr-5052

Conversation

@mergify

@mergify mergify Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

An ICS20 MsgTransfer whose packet sender is the IBC escrow (#IBC) was accepted: escrowing the sent tokens is a no-op transfer from the escrow to itself, so no balance changes, while the withdraw counter and the packet commitment are still written. The counterparty then mints vouchers which can be returned to release genuine escrowed tokens, and since no balance key changes the rate limits were skipped too. Burning vouchers held in escrow, or sending NFTs held in escrow, abuses the same missing authorization.

The IBC VP now rejects any (NFT) transfer whose sender is an internal address. The fix lives only in the native VP, so the wasm txs are unchanged. The IBC message is now decoded once in the VP and shared by the sender and rate limit checks.

Add regression tests running the real tx_ibc.wasm, sharing the IBC channel setup with the existing escrow drain tests.

Describe your changes

Checklist before merging

  • If this PR has some consensus breaking changes, I added the corresponding breaking:: labels
    • This will require 2 reviewers to approve the changes
  • If this PR requires changes to the docs or specs, a corresponding PR is opened in the namada-docs repo
    • Relevant PR if applies:
  • If this PR affects services such as namada-indexer or namada-masp-indexer, a corresponding PR is opened in that repo
    • Relevant PR if applies:

This is an automatic backport of pull request #5052 done by [Mergify](https://mergify.com).

Fraccaman and others added 2 commits October 6, 2026 13:16
An ICS20 `MsgTransfer` whose packet sender is the IBC escrow (`#IBC`)
was accepted: escrowing the sent tokens is a no-op transfer from the
escrow to itself, so no balance changes, while the withdraw counter and
the packet commitment are still written. The counterparty then mints
vouchers which can be returned to release genuine escrowed tokens, and
since no balance key changes the rate limits were skipped too. Burning
vouchers held in escrow, or sending NFTs held in escrow, abuses the same
missing authorization.

The IBC VP now rejects any (NFT) transfer whose sender is an internal
address. The fix lives only in the native VP, so the wasm txs are
unchanged. The IBC message is now decoded once in the VP and shared by
the sender and rate limit checks.

Add regression tests running the real `tx_ibc.wasm`, sharing the IBC
channel setup with the existing escrow drain tests.

(cherry picked from commit 6279d76)
The `outgoing_shielded_action` bench built its ICS20 `MsgTransfer` with
the effective address of the source as the packet sender. For a shielded
source that is the MASP internal address, which the IBC VP now rejects:
no tx can authorize a transfer on behalf of a protocol-owned address.

Real shielded sends are unaffected: the SDK uses a transparent refund
address as the packet sender, while the funds are still drawn from the
MASP through the shielded section of the tx. Mirror that behavior in the
bench, so it exercises the txs actually produced in practice.

(cherry picked from commit c1f15a2)
@sug0
sug0 merged commit b9c8c2a into maint-201.0 Oct 6, 2026
22 of 23 checks passed
@sug0
sug0 deleted the mergify/bp/maint-201.0/pr-5052 branch October 6, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants