The Ledger
Bitcoin Core Patches Two Remote Memory-Exhaustion Bugs
Bitcoin Core disclosed two medium-severity bugs that could let malicious peers exhaust a node’s memory, with fixes in versions 29.5, 30.4, 31.2 and 32.1. One affected queued messages to paused peers without BIP 31 nonce-based pings; the other affected TCP urgent-data handling on non-Linux systems.

5MB an Hour on an Outbound Peer
One of two Bitcoin Core bugs disclosed on October 28 could add as much as 5MB of queued messages per hour for each outbound peer. The flaws are both rated medium severity and could let a malicious peer exhaust a node’s memory. Bitcoin Core says fixes are included in versions 29.5, 30.4, 31.2 and 32.1.
The first bug involves peers that do not support BIP 31’s nonce-based ping messages. Bitcoin Core limits queued data for peers that read slowly, but still adds some announcements—including frequent transaction announcements—to the queue after pausing a peer for sending. Ordinarily, a peer that fails to answer a nonce-based ping is disconnected after 20 minutes.
That timeout does not apply to peers without BIP 31’s nonce-based ping support. A malicious peer could exploit the exception by pretending not to support those messages and strategically delaying reads, leaving Bitcoin Core’s queue of messages to send to that peer to grow without a bound. The project says nodes running with -blocksonly are much less affected because transaction announcements make up most of the queued messages.
The disclosure estimates that memory use could grow by up to 2MB per hour per inbound peer and 5MB per hour per outbound peer.
TCP Urgent Data Bypassed the Non-Linux Path
The second flaw is tied to how Bitcoin Core monitors network sockets on non-Linux systems. Linux uses a poll()-based backend, while other platforms use a backend based on select(). In the latter, socket exception monitoring could trigger reads even after Bitcoin Core had paused a peer to limit incoming data.
A malicious connected peer could send TCP urgent, or out-of-band, data to trigger that condition. The resulting reads could keep adding data to the peer’s processing queue despite the backpressure limit, allowing memory use to grow until the node ran out of memory. Bitcoin Core says the flaw could trivially crash a connected node running Windows, macOS or BSD; Linux nodes are not affected by this issue.
Project Loupe’s Scan Led to the Fixes
Bitcoin Core says automated LLM scanning by Project Loupe, an initiative at Spiral, found both flaws. Gregory Sanders validated the findings and brought them to the Bitcoin Core security team. The first issue was independently rediscovered by L0rinc, according to the project’s disclosure.
Bitcoin Core opened and merged fixes on October 26, then backported them across four release branches. Versions 31.2 and 32.1 shipped with fixes on October 27; versions 29.5 and 30.4 followed on October 28. The project classifies both bugs as “easily discoverable,” alongside their medium-severity rating.
Four Versions Carry the Patches
The fixes are included in releases 29.5, 30.4, 31.2 and 32.1. However, Bitcoin Core’s 32.1 release notes say that versions 29.x and older are end-of-life and will no longer receive updates, so the 29.x branch is not a continuing update option. The release notes direct users running older software to shut it down fully before installing an update. The disclosures identify memory exhaustion as the impact; they do not describe a route to steal bitcoin or alter consensus rules.
The two bugs affect separate paths: the first can slowly grow a queue of messages sent to a peer when peers without BIP 31 nonce-based ping support evade a timeout; the second can bypass a processing limit through TCP urgent data on non-Linux systems. The released patches address both in the four listed versions.
Sources
- Original source Bitcoin Core · Disclose fpausesend oom bitcoincore.org
Other pages read
- Bitcoin Core · Disclose tcp oom bitcoincore.org
- Bitcoin Core · page 3 bitcoincore.org