Plain Strata: Integer Overflow, Why a Guard Built From the Same Arithmetic Certified a Theft

From Plain Strata · 00:13:53

Show by Plain Strata

A mechanical odometer with five windows of digits reads twenty-one after a hundred thousand and twenty-one miles, because the wheels turn past the last place and start again from zero, a correct reading of the wheel and a false reading of the trip, and that is what happened to the part of a payment network whose only job is to notice money appearing from nowhere. The XRP Ledger, a payment network anyone can join, stores every amount in a fixed-width container of sixty-four binary digits (the on-or-off switches a number is built from), about ninety-two times the entire money supply, so for ten years nothing came near the edge, until one payment consumed two hundred and fifty-six offers of about seventy-two billion XRP each, summed them with no overflow check, wrapped past the edge and handed the attacker about eighteen and a half trillion new XRP for a fraction of a penny, a hundred and eighty-four times everything that exists. The guard against exactly this, an invariant (a rule that must hold whatever any transaction does, from the Latin for not changing) that adds up every balance change and demands the total equal minus the fee, did its own addition in the same sixty-four-digit arithmetic, wrapped in step with the thing it was checking and reported an ordinary fee burn. After ten years of human readers, a bug bounty (a standing cash reward for reporting flaws) and a hacking contest, an automated code auditor from Veria Labs found it within a day, and the network shipped the fix without its normal two-week validator vote (servers agreeing by upgrading the software) and held back the patch's source, because a published fix is a map of the flaw and a machine reads that map faster than operators can upgrade. The honest limit is that a check can fail in the same way, at the same moment, as the thing it checks, and that nothing lost on the live network is no defence for a guard that never met the one transaction able to beat it, while the governance question stays open, since the slowness of a vote is what makes a rule credible and also the window an attacker works in. The voices in this show are AI-generated; the research and writing are human. Decentralized AI, layer by layer.

More episodes of Plain Strata

More episodes

PodSearch is a free, independent podcast search engine. Read about PodSearch, the privacy policy or contact us.