audit: swap-fee math silently contributes 0 ppk for proofs on keysets unknown to the wallet's view (PoC reproduced; fix in gonuts-tollgate)
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
The bug is in feesForProofs in wallet/wallet.go of the gonuts-tollgate fork (around lines 1934-1944), which adds 0 ppk for proofs whose keyset id is neither active nor in inactiveKeysets. The below-fee refusal in merchant.go (around line 1539) depends on that figure. Start by reproducing with proofs carrying unknown keyset ids, then choose refuse or worst-case counting. Done means an unknown keyset never yields a silent zero fee. The fork is not on this tracker and the design choice is open, so confirm the approach with maintainers first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
From the 2026-10-09 Cashu audit. PoC reproduced against fork d7591d2. Fork-first fix, tracked here (issues disabled on the fork).
Finding
Fork wallet/wallet.go feesForProofs (≈:1934-1944): a proof whose keyset id is neither the active keyset nor in inactiveKeysets adds 0 ppk silently — no error, no refusal.
cashu.Proofs{{Id:"00rotated-away",…},{Id:"00never-seen",…}} → feesForProofs = 0, nil
Path
When the mint's keyset listing prunes/hides the keyset a token's proofs carry (hostile mint, aggressive rotation), the wallet underestimates the fee → the below-fee refusal (merchant.go:1539) never fires → the swap consumes the whole note. Same family as #752's fee edges.
Minimal fix
Unknown keyset in the fee path = refuse (or count worst-case), never silently zero. CWE-682. Severity MEDIUM-LOW (precondition: mint stops listing a still-swappable keyset).
Cross-refs: #703, #752.
- Lingua principale
- Go
- Stelle
- 12
- Fork
- 14
- Merge medio
- 4g 19h
- PR unite (30g)
- 213
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenTollGate/tollgate-module-basic-go
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
OpenTollGate/tollgate-module-basic-go#1159 ·
I maintainer di solito rispondono entro 2 giorni
-
Degraded-mode hygiene follow-ups: dead walletNotInitializedError() + main.go's startup log still over-promises mint recoveryForse già presa @Amperstrand l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
OpenTollGate/tollgate-module-basic-go#1135 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
setup_uhttpd_portal hardcodes the GUEST portal docroot to the TollGate path — the brand token cannot select a re-brand guest portalForse già presa @Amperstrand l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
OpenTollGate/tollgate-module-basic-go#1122 ·
I maintainer di solito rispondono entro 2 giorni
-
changelog: dependency-security sweep missing from [Unreleased] [Amperstrand fork #105 review debt]Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
OpenTollGate/tollgate-module-basic-go#1055 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenTollGate/tollgate-module-basic-go#1027 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di OpenTollGate/tollgate-module-basic-go
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
JakeChampion/lang#14392 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-butler-finding bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
jordansmall/spindrift#6557 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Custom tool truncation leaves unused stream copies openForse già presa @OUAO-FRANK l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[v3] KeyBindingManager calls (Add/Remove) are not converted into a case-insensitive accelerator.KeyApertaBug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
crmne/hyprmoncfg#114 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno