# DoS via malicious p2p message Source: https://github.com/ethereum/go-ethereum/security/advisories/GHSA-4xc9-8hmq-j652 Kiwi News: https://news.kiwistand.com/stories/DoS-via-malicious-p2p-message?index=0x6638ed00e4bda5671b890d3a7efd4e720f2764c5544b924050663b324b5130e7930bc805 Submitted by misha on 2024-05-06 UTC, 1 upvote, 0 comments ## Summary A denial-of-service vulnerability in the go-ethereum (geth) node allows a remote attacker to make a vulnerable node consume very large amounts of memory via specially crafted p2p messages. The attacker connects to the victim and sends a GetBlockHeadersRequest message with a count of 0 using the ETH protocol. Due to integer overflow in the count-1 calculation passed to GetHeadersFrom, the function receives UINT64_MAX, which bypasses maxHeadersServe and requests all headers from the latest block back to the genesis block. The fix is included in geth version 1.13.15 and later, and the issue was disclosed by DongHan Kim through the Ethereum bug bounty program. ## Article Impact A vulnerable node can be made to consume very large amounts of memory when handling specially crafted p2p messages sent from an attacker node. In order to carry out the attack, the attacker establishes a peer connections to the victim, and sends a malicious GetBlockHeadersRequest message with a count of 0, using the ETH protocol. In descendants := chain.GetHeadersFrom(num+count-1, count-1), the value of count-1 is passed to the function GetHeadersFrom(number, count uint64) as parameter count. Due to integer overflow, UINT64_MAX value is then passed as the count argument to function GetHeadersFrom(number, count uint64). This allows an attacker to bypass maxHeadersServe and request all headers from the latest block back to the genesis block. Patches The fix has been included in geth version 1.13.15 and onwards. The vulnerability was patched in: #29534 Workarounds No workarounds have been made public. References No more information is released at this time. Credit This issue was disclosed responsibly by DongHan Kim via the Ethereum bug bounty program. Thank you for your cooperation.