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

Merge bitcoin-core/secp256k1#1974: silentpayments: reject label tweaks that overflow the group order

Public commit record

What the developer wrote

Authored by merge-script

96/100 · Strong
Merge bitcoin-core/secp256k1#1974: silentpayments: reject label tweaks that overflow the group order

95552e1654bfd3d34facfcf64e7ca3b0a52594c0 silentpayments: reject label tweaks that overflow the group order (Sebastian Falbesoner)

Pull request description:

Label tweaks returned by the `label_lookup` callback that overflow the group order were silently reduced. `recipient_label_create` never produces such tweaks, so an overflowing one means the caller's label cache is broken. As suggested in https://github.com/bitcoin-core/secp256k1/pull/1929#issuecomment-6310143782, this PR treats it as API misuse using `ARG_CHECK` (illegal callback, return 0), documents the requirement. It also adds a test and a changelog entry.

ACKs for top commit:
fametrano:
tACK 95552e1654bfd3d34facfcf64e7ca3b0a52594c0
real-or-random:
utACK 95552e1654bfd3d34facfcf64e7ca3b0a52594c0

Tree-SHA512: 3530e3887d4b3c1a7b083eb3e8c743d860499fb68f5395b2d5b04b7c13d1bab88bd1180517015d0f08e1b48c92dde68a5a367a808416d609ef5372742ed129a3
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This change fixes a silent handling problem in Bitcoin's silent payments feature. When a user-supplied label tweak value was larger than the cryptographic group order, the code previously reduced it silently, which could lead to incorrect payment scanning results. Now the code rejects such oversized values as API misuse. This is a defensive correctness fix rather than an active remote exploit.

Recommended action

Merge the patch. It is a low-risk defensive fix that improves API contract enforcement and prevents silent incorrect behavior from malformed caller label caches. No immediate incident response is warranted unless callers were relying on the previous silent reduction behavior, which should be considered a bug.

Security signals we found

01

silent modular reduction of attacker/caller-controlled scalar

02

API misuse now rejected via ARG_CHECK

03

sensitive scalar clearing before early return to avoid leaking transaction indistinguishability data

04

silent payments output matching correctness

Risk score

Why this scored 35/100

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