mirror of
https://github.com/ZmnSCPxj/clboss.git
synced 2026-08-13 12:33:20 +02:00
The fee budget check reads out_expenditures, which is only persisted once a rebalance completes (up to 120 s per run). Each incoming HTLC spawned an independent rebalance run with no guard, so concurrent HTLCs to the same underfunded channel each passed the check against the same stale value, multiplying the intended 25%-of-earnings aggregate cap by the number of concurrent triggers. Skip HTLC-triggered rebalances for a node that already has one in flight, mirroring the working guard in EarningsRebalancer. Skipped HTLCs are released immediately and proceed without JIT rebalancing; a retry after the in-flight run completes sees both the refilled channel and the updated budget. Update the parallel-calls unit test to the new semantics: exactly one of three concurrent calls is let in, only it requests a rebalance, and the guard clears once the run completes. Reported by an external security researcher via private disclosure. Fixes #323 |
||
|---|---|---|
| .. | ||
| Mod | ||
| ModG | ||
| Msg | ||
| concurrent.cpp | ||
| concurrent.hpp | ||
| JsonInput.cpp | ||
| JsonInput.hpp | ||
| log.cpp | ||
| log.hpp | ||
| Main.cpp | ||
| Main.hpp | ||
| open_rpc_socket.cpp | ||
| open_rpc_socket.hpp | ||
| random_engine.cpp | ||
| random_engine.hpp | ||
| Shutdown.hpp | ||
| Signer.cpp | ||
| Signer.hpp | ||