Skip to content

Commit 7cf880b

Browse files
committed
posts: disclose historical DoS vulnerability (INV buffer blowup)
1 parent f0756b7 commit 7cf880b

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
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 (≤ 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 %}

0 commit comments

Comments
 (0)