Skip to content

Commit 958404b

Browse files
committed
Merge #1042: Security advisories for bugs fixed as of Bitcoin Core 0.21.0
0a549fa advisory page: show latest disclosure first (Antoine Poinsot) 054d744 posts: disclose historical DoS vulnerability (header spam) (Antoine Poinsot) d2943c5 posts: disclose historical DoS vulnerability (orphan resolution) (Antoine Poinsot) 04a8f71 posts: disclose historical DoS vulnerability (GETDATA 100% CPU) (Antoine Poinsot) 7cf880b posts: disclose historical DoS vulnerability (INV buffer blowup) (Antoine Poinsot) f0756b7 posts: disclose historical netsplit vulnerability (timestamp overflow) (Antoine Poinsot) 259217b posts: disclose historical DoS vulnerability (unbounded banlist) (Antoine Poinsot) 2d4af7c posts: disclose historical tx relay censorship vulnerability (g_already_asked_for rolling) (Antoine Poinsot) 4b564d3 posts: disclose historical DoS vulnerability (BIP70) (Antoine Poinsot) 9718761 posts: disclose historical RCE vulnerability (miniupnpc) (Antoine Poinsot) 39a9a30 posts: disclose historical DoS vulnerability (receive buffer) (Antoine Poinsot) Pull request description: This publicly discloses 10 security vulnerabilities fixed in Bitcoin Core 0.21.0 or earlier versions. 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: achow101: ACK 0a549fa sipa: ACK 0a549fa fanquake: ACK 0a549fa Tree-SHA512: ee8a3269ce24e5c87a6cfc9195eab42fc879f61efdc393c0f03b3ba6ab23124f70e7d3ea0b673de38db04e98f9e7b5bec6016218d9e2bae8cdfbb4e15b862619
2 parents 5964aff + 0a549fa commit 958404b

11 files changed

+522
-1
lines changed

_posts/en/pages/2024-06-26-security-advisories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ differentiate between 4 classes of vulnerabilities:
4040

4141
## Past Security Advisories
4242

43-
{% assign advisories=site.posts | where:"lang", 'en' | where:"type", 'advisory' %}
43+
{% assign advisories=site.posts | where:"lang", 'en' | where:"type", 'advisory' | sort: "date" | reverse %}
4444
{% for advisory in advisories %}
4545
{% assign post=advisory %}
4646
<article>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: Disclosure of crash due to malicious BIP72 URI (&le; version 0.19.2)
3+
name: blog-disclose-bip70-crash
4+
id: en-blog-disclose-bip70-crash
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+
The BIP70 implementation in Bitcoin Core could silently crash when opening a BIP72 URI.
17+
---
18+
19+
Bitcoin-Qt could crash upon opening a [BIP72](https://github.com/bitcoin/bips/blob/master/bip-0072.mediawiki) URI.
20+
21+
This issue is considered **Medium** severity.
22+
23+
## Details
24+
25+
[BIP72](https://github.com/bitcoin/bips/blob/master/bip-0072.mediawiki) extends the BIP21 URI scheme
26+
with an `r` parameter to fetch a payment request from. An attacker could simply point the URL
27+
contained in the `r` parameter to a very large file, for which Bitcoin-Qt would try to allocate
28+
enough memory and crash.
29+
30+
The victim could get tricked into opening a rogue payment request. The large download would happen
31+
in the background with little to no output in the GUI until the application runs out of memory.
32+
33+
## Attribution
34+
35+
Credits go to Michael Ford (Fanquake) for responsibly disclosing the issue and providing a PoC.
36+
37+
## Timeline
38+
39+
- 2019-08-12 Michael Ford reports the bug to Cory Fields and Wladimir Van Der Laan
40+
- 2019-10-16 Michael Ford opens PR [#17165](https://github.com/bitcoin/bitcoin/pull/17165) to get rid of BIP70 support entirely
41+
- 2019-10-26 Michael's PR is merged into Bitcoin Core
42+
- 2020-06-03 Bitcoin Core version 0.20.0 is released
43+
- 2021-09-13 The last vulnerable Bitcoin Core version (0.19.0) goes EOL
44+
- 2024-07-03 Public disclosure
45+
46+
{% include references.md %}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Disclosure of CPU DoS due to malicious P2P message (&le; version 0.19.2)
3+
name: blog-disclose-getdata-cpu
4+
id: en-blog-disclose-getdata-cpu
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+
A malformed `GETDATA` message could trigger an infinite loop on the receiving node, using 100% of the CPU allocated to this thread.
17+
---
18+
19+
A malformed `GETDATA` message could trigger an infinite loop on the receiving node, using 100% of
20+
the CPU allocated to this thread and not making further progress on this connection.
21+
22+
This issue is considered **Low** severity.
23+
24+
## Details
25+
26+
Before Bitcoin Core 0.20.0, an attacker (or buggy client, even) could send us a `GETDATA` message
27+
that would cause our net_processing thread to start spinning at 100%, and not make progress
28+
processing messages for the attacker peer anymore. It would still make progress processing messages
29+
from other peers, so it is just a CPU DoS with low impact beyond that (not making progress for
30+
attacker peers is a non-issue). It also increases per-peer long-term memory usage up by 1.5 MB per
31+
attacker peer.
32+
33+
John Newbery opened [PR #18808](https://github.com/bitcoin/bitcoin/pull/18808) to fix this issue by
34+
only disclosing the lack of progress.
35+
36+
## Attribution
37+
38+
Credits to John Newbery for finding this bug, responsibly disclosing it and fixing it.
39+
40+
## Timeline
41+
42+
- 2020-04-29 John Newbery opens #18808
43+
- 2020-05-08 John Newbery reports his finding by email
44+
- 2020-05-12 #18808 is merged
45+
- 2020-06-03 Bitcoin Core version 0.20.0 is released with a fix
46+
- 2021-09-13 The last vulnerable Bitcoin Core version (0.19.x) goes EOL
47+
- 2024-07-03 Public disclosure.
48+
49+
{% include references.md %}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Disclosure of memory DoS using low-difficulty headers (&le; version 0.14.3)
3+
name: blog-disclose-header-spam-checkpoint-bypass
4+
id: en-blog-disclose-header-spam-checkpoint-bypass
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+
After Bitcoin Core 0.12.0 and before Bitcoin Core 0.15.0 a node could be spammed with minimum difficulty headers, which could possibly be leveraged to crash it by OOM.
17+
---
18+
19+
After Bitcoin Core 0.12.0 and before Bitcoin Core 0.15.0 a node could be spammed with minimum
20+
difficulty headers, which could possibly be leveraged to crash it by OOM.
21+
22+
This issue is considered **Medium** severity.
23+
24+
## Details
25+
26+
Before the introduction of [headers
27+
pre-synchronisation](https://github.com/bitcoin/bitcoin/pull/25717), nodes relied exclusively on
28+
checkpoints to avoid getting spammed by low-difficulty headers.
29+
30+
In Bitcoin Core 0.12.0 a check for headers forking before the last checkpoint's height was moved to
31+
after storing the header in `mapBlockIndex`. This allowed an attacker to grow the map unboundedly by
32+
spamming headers whose parent is the genesis block (which only need difficulty 1 to create), as such
33+
blocks bypassed the checkpoint logic.
34+
35+
## Attribution
36+
37+
Credits to Cory Fields for finding and responsibly disclosing the bug.
38+
39+
## Timeline
40+
41+
- 2017-08-08 Cory Fields privately reports the bug
42+
- 2017-08-11 Pieter Wuille opens [PR #11028](https://github.com/bitcoin/bitcoin/pull/11028) to fix it
43+
- 2017-08-14 PR #11028 is merged
44+
- 2017-09-14 Bitcoin Core version 0.15.0 is released with a fix
45+
- 2018-10-03 The last vulnerable version of Bitcoin Core (0.14.3) goes end of life
46+
- 2024-07-03 Public disclosure.
47+
48+
{% include references.md %}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Disclosure of memory DoS due to malicious P2P message (&le; version 0.19.2)
3+
name: blog-disclose-inv-buffer-blowup
4+
id: en-blog-disclose-inv-buffer-blowup
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+
Public disclosure of a DoS vulnerability affecting old versions of Bitcoin Core
17+
---
18+
19+
A node could be forced to allocate a significant amount of memory upon receiving a specially crafted
20+
`INV` message. This was particularly an issue for nodes with little available memory or a large
21+
number of connections.
22+
23+
This issue is considered **Medium** severity.
24+
25+
## Details
26+
27+
An `INV` message filled with 50,000 block items could cause 50,000 `getheaders` responses to be sent
28+
in a single `ProcessMessages()` call. Each response contains a locator and is around 1 kB. All would
29+
be put into the send buffer at once. The attacker could just refuse to receive data to prevent the
30+
50 MB buffer from draining.
31+
32+
John Newbery opened [PR #18962](https://github.com/bitcoin/bitcoin/pull/18962) to fix this issue
33+
pretexting a bandwidth gain from sending a single `GETHEADERS` per received `INV`.
34+
35+
## Attribution
36+
37+
Credits to John Newbery for finding this bug, responsibly disclosing it and fixing it.
38+
39+
## Timeline
40+
41+
- 2020-05-08 John Newbery reports his finding by email
42+
- 2020-05-12 John Newbery opens #18962
43+
- 2020-05-14 #18962 is merged
44+
- 2020-06-03 Bitcoin Core version 0.20.0 is released with a fix
45+
- 2021-09-13 The last vulnerable Bitcoin Core version (0.19.x) goes EOL
46+
- 2024-07-03 Public disclosure.
47+
48+
{% 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 CPU DoS / stalling due to malicious P2P message (&le; version 0.17.2)
3+
name: blog-disclose-orphan-dos
4+
id: en-blog-disclose-orphan-dos
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+
A node could be stalled for hours when processing the orphans of a specially crafted unconfirmed transaction.
17+
---
18+
19+
A node could be stalled for hours when processing the orphans of a specially crafted unconfirmed
20+
transaction.
21+
22+
This issue is considered **High** severity.
23+
24+
## Details
25+
26+
After accepting a transaction into its mempool, the node would go through its cache of orphan
27+
transactions to find if this new accepted transaction makes it possible to accept any. This search
28+
was quadratic: for each output in the newly accepted transaction it would go through all cached
29+
orphan transactions (limited to 100). By specially crafting the orphan transactions to be invalid
30+
yet expensive to validate a node could be stalled for several hours.
31+
32+
The stall was fixed by Pieter Wuille in [PR #15644](https://github.com/bitcoin/bitcoin/pull/15644)
33+
by interrupting the orphan resolution to process new messages when a match is found (whether the
34+
orphan turns out to be valid or not).
35+
36+
## Attribution
37+
38+
Credits to sec.eine for responsibly disclosing the bug and providing feedback on the fix.
39+
40+
## Timeline
41+
42+
- 2019-03-19 sec.eine reports the issue to Greg Maxwell by email
43+
- 2019-03-21 Greg Maxwell responds with information about the proposed patch
44+
- 2019-03-22 sec.eine gives feedback on the patch ("seems solid and [..] doesn't attract attention")
45+
- 2019-03-22 Pieter Wuille opens PR #15644
46+
- 2019-04-01 PR #15644 is merged
47+
- 2019-05-18 Bitcoin Core version 0.18.0 is released with a fix
48+
- 2020-07-22 The issue is [partially disclosed](https://bitcoincore.reviews/15644#l-285) during a PR review club
49+
- 2020-08-01 The last vulnerable Bitcoin Core version (0.17.x) goes EOL
50+
- 2024-07-03 Public disclosure.
51+
52+
{% 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 netsplit due to malicious P2P messages by first 200 peers (&le; version 0.20.1)
3+
name: blog-disclose-timestamp-overflow
4+
id: en-blog-disclose-timestamp-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+
Disclosure of the details of an integer overflow bug which risked causing a network split.
17+
---
18+
19+
Disclosure of the details of an integer overflow bug which risked causing a network split, a fix for
20+
which was released on January 15th, 2021 in Bitcoin Core version 0.21.0.
21+
22+
This issue is considered **Medium** severity.
23+
24+
## Technical details
25+
26+
A network split vulnerability resulted from two separate bugs in the processing code of `version`
27+
messages:
28+
* Signed-integer overflow when calculating the time offset for newly connecting peers.
29+
* abs64 logic bug (`abs64(std::numeric_limits<int64_t>::min()) ==
30+
std::numeric_limits<int64_t>::min()`), resulting in a bypass of the maximum time adjustment limit.
31+
32+
The two bugs allow an attacker to force a victims adjusted time (`system time + network time
33+
offset`) to be skewed such that any new blocks are rejected for having a timestamp that is dated too
34+
far in the future. It should be noted that this attack assumes the attacker is among the first 200
35+
peers to connect to the victim, as only the time offsets from those initial connections are factored
36+
into adjusted time.
37+
38+
## Attribution
39+
40+
Credit goes to [practicalswift](https://github.com/practicalswift) for discovering and providing the
41+
initial fix for the vulnerability, and Pieter Wuille for the fix as well as general cleanup to the
42+
at-risk code.
43+
44+
## Timeline
45+
46+
* 2020-10-10 Initial report send to security@bitcoincore.org
47+
* 2020-10-13 Fix merged into Bitcoin Core (https://github.com/bitcoin/bitcoin/pull/20141)
48+
* 2021-01-15 v0.21.0 released
49+
* 2022-04-25 The last vulnerable Bitcoin Core version (0.20.x) goes EOL
50+
* 2024-07-03 Public disclosure
51+
52+
{% 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 CPU/memory DoS due to many malicious peers (&le; version 0.20.0)
3+
name: blog-disclose-unbounded-banlist
4+
id: en-blog-disclose-unbounded-banlist
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+
Bitcoin Core maintained an unlimited list of banned IP addresses and performed a quadratic operation on it. This could lead to an OOM crash and a CPU Dos.
17+
---
18+
19+
Bitcoin Core maintained an unlimited list of banned IP addresses and performed a quadratic operation
20+
on it. This could lead to an OOM crash and a CPU Dos.
21+
22+
This issue is considered **High** severity.
23+
24+
## Details
25+
26+
Bitcoin Core maintained a list of banned IP addresses. This list was not bounded and could be
27+
manipulated by an adversary. Adding new entries to this list was particularly cheap for an attacker
28+
when considering IPV6. In addition, when receiving a `GETADDR` message, Bitcoin Core would scan the
29+
entire ban list for every single address to be returned (up to 2500).
30+
31+
## Attribution
32+
33+
Calin Culianu first responsibly disclosed it. Calin later publicly disclosed the bug in [a PR
34+
comment](https://github.com/bitcoin/bitcoin/pull/15617#issuecomment-640898523).
35+
36+
On the same day Jason Cox from Bitcoin ABC emailed the Bitcoin Core project to share this same
37+
report they also received.
38+
39+
## Timeline
40+
41+
- 2020-06-08 Calin Culianu privately reports the bug to the Bitcoin Core project
42+
- 2020-06-08 Jason Cox privately shares the (same) report sent to Bitcoin ABC with Bitcoin Core
43+
- 2020-06-08 Calin Culianu publicly discloses the vulnerability on the original PR which introduced the quadratic behaviour
44+
- 2020-06-09 Pieter Wuille opens PR [#19219](https://github.com/bitcoin/bitcoin/pull/19219) which fixes both the unbounded memory usage and the quadratic behaviour
45+
- 2020-06-16 Luke Dashjr gets assigned CVE-2020-14198 for this vulnerability after his request
46+
- 2020-07-07 Pieter's PR is merged
47+
- 2020-08-01 Bitcoin Core 0.20.1 is released with the fix
48+
- 2021-01-14 Bitcoin Core 0.21.0 is released with the fix
49+
- 2022-04-25 The last vulnerable Bitcoin Core version (0.20.0) goes EOL
50+
- 2024-07-03 (Official) Public Disclosure
51+
52+
{% include references.md %}

0 commit comments

Comments
 (0)