|
| 1 | +--- |
| 2 | +title: Disclosure of CPU DoS due to malicious P2P message (≤ 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 %} |
0 commit comments