Skip to content

Commit 0f060bc

Browse files
committed
Merge #1049: Security advisories for bugs fixed as of Bitcoin Core v22.0
fb62f9d posts: Disclose upnp infinite-loop/oom (dergoegge) b721ee5 posts: Disclose addrman idcount integer overflow (dergoegge) Pull request description: This publicly discloses 2 security vulnerabilities fixed in Bitcoin Core v22.0 and above. These writeups result from a common effort to dig up and document past vulnerabilities with achow101 ajtowns fanquake dergoegge and sipa. ACKs for top commit: darosior: ACK fb62f9d glozow: ACK fb62f9d Tree-SHA512: fea1321115b3a0d434df3bf285118564960dcb35cde733fb80254b86b2788b95a87cba3183f802ef92b38e59798e58d2b260ba1ea9e5c589e2b470fe70c15fb9
2 parents 8b7485d + fb62f9d commit 0f060bc

File tree

2 files changed

+97
-0
lines changed

2 files changed

+97
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: Disclosure of remote crash due to addr message spam
3+
name: blog-disclose-addrman-idcount-in-overflow
4+
id: blog-disclose-addrman-idcount-in-overflow
5+
lang: en
6+
type: advisory
7+
layout: post
8+
9+
## If this is a new post, reset this counter to 1.
10+
version: 1
11+
12+
## Only true if release announcement or security annoucement. English posts only
13+
announcement: 1
14+
15+
excerpt: >
16+
Nodes could be spammed with addr messsages, which could be used to crash them. A fix was released on September 14th, 2021 in Bitcoin Core v22.0.
17+
---
18+
19+
Disclosure of the details of an integer overflow bug which causes an assertion
20+
crash, a fix for which was released on September 14th, 2021 in Bitcoin Core
21+
version v22.0.
22+
23+
This issue is considered **High** severity.
24+
25+
## Details
26+
27+
`CAddrMan` has a 32-bit `nIdCount` field that is incremented on every insertion
28+
into addrman, and which then becomes the identifier for the new entry. By
29+
getting the victim to insert 2<sup>32</sup> entries (through e.g. spamming addr
30+
messages), this identifier overflows, which leads to an assertion crash.
31+
32+
## Attribution
33+
34+
Credit goes to Eugene Siegel for discovering and disclosing the vulnerability,
35+
and to Pieter Wuille for fixing the issue in
36+
https://github.com/bitcoin/bitcoin/pull/22387.
37+
38+
## Timeline
39+
40+
* 21-06-2021 - Initial report sent to security@bitcoincore.org by Eugene Siegel
41+
* 19-07-2021 - Fix is merged (https://github.com/bitcoin/bitcoin/pull/22387)
42+
* 13-09-2021 - v22.0 is released
43+
* 31-07-2024 - Public disclosure
44+
45+
{% include references.md %}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Disclosure of the impact of an infinite loop bug in the miniupnp dependency
3+
name: blog-disclose-miniupnp-bug-impact
4+
id: en-blog-disclose-miniupnp-bug-impact
5+
lang: en
6+
type: advisory
7+
layout: post
8+
9+
## If this is a new post, reset this counter to 1.
10+
version: 1
11+
12+
## Only true if release announcement or security annoucement. English posts only
13+
announcement: 1
14+
15+
excerpt: >
16+
Nodes could be crashed by a malicious UPnP device on the local network. A fix was released on September 14th, 2021 in Bitcoin Core v22.0.
17+
---
18+
19+
Disclosure of the impact of an infinite loop bug in the miniupnp dependency on
20+
Bitcoin Core, a fix for which was released on September 14th, 2021 in Bitcoin
21+
Core version v22.0.
22+
23+
This issue is considered **Low** severity.
24+
25+
## Details
26+
27+
Miniupnp, the UPnP library used by Bitcoin Core, would be waiting upon
28+
discovery for as long as it receives random data from a device on the network.
29+
In addition it would allocate memory for every new device information. An
30+
attacker on the local network could pretend to be a UPnP device and keep
31+
sending bloated M-SEARCH replies to the Bitcoin Core node until it runs out of
32+
memory.
33+
34+
Only users running with the <code>-miniupnp</code> option would have been
35+
affected by this bug as Miniupnp is otherwise turned off by default.
36+
37+
## Attribution
38+
39+
Credit goes to Ronald Huveneers for reporting the infinite loop bug to the
40+
miniupnp project, and to Michael Ford (Fanquake) for the report to the Bitcoin
41+
Core project along with a PoC exploit to trigger an OOM and a pull request to
42+
bump the dependency (containing the fix).
43+
44+
## Timeline
45+
46+
* 17-09-2020 - Initial report of infinite loop bug to miniupnp by Ronald Huveneers
47+
* 13-10-2020 - Initial report sent to security@bitcoincore.org by Michael Ford
48+
* 23-03-2021 - Fix is merged (https://github.com/bitcoin/bitcoin/pull/20421)
49+
* 13-09-2021 - v22.0 is released
50+
* 31-07-2024 - Public disclosure
51+
52+
{% include references.md %}

0 commit comments

Comments
 (0)