EN
EN Current RU
Telegram
Learn

How an Integer Overflow Could Crash Bitcoin Core’s Address Manager

Bitcoin Core’s address manager used a 32-bit counter for new entries. The project says that inserting 2^32 entries could overflow the identifier and trigger an assertion crash; a fix was released in 2021.

Share
Telegram X Bluesky Reddit WhatsApp
Computer screen displaying HTML code for a web development project
Photo by Mohammad Rahmani on Unsplash

How the counter could trigger a crash

Bitcoin Core’s address manager, known as addrman, assigns identifiers to new entries. According to the Bitcoin Core disclosure, its CAddrMan structure has a 32-bit nIdCount field that increments with every insertion into addrman, then serves as the identifier for that new entry.

Bitcoin Core says that if a victim were made to insert 2^32 entries—for example, through spammed addr messages—the identifier would overflow and cause an assertion crash. The reported issue was therefore a crash mechanism tied to the counter reaching its limit, not a claim that the counter overflowed during ordinary single insertions.

The fix preceded public disclosure

Bitcoin Core reports that the fix was released in version v22.0 on September 14, 2021. The project’s public disclosure of the issue followed on July 31, 2024, so the disclosure date was not the date the fix was released.

Severity in the project’s assessment

Bitcoin Core classifies the issue as High severity. That is the project’s stated assessment; the disclosure also records that a fix had already been released in v22.0 in 2021.

Sources

  1. CVE-2024-52919 - Remote crash due to addr message spam

← All posts