-
Notifications
You must be signed in to change notification settings - Fork 36.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
p2p: Do not relay banned IP addresses #15617
Conversation
Concept ACK. utACK, will test. |
utACK |
utACK 054d01d |
1 similar comment
utACK 054d01d |
How can this be tested? |
ACK (now tested it, appears to work) |
@promag Instrument your node to log the addr message it sends, ban stuff, check that it's not relaying the banned stuff... which is what I did :) (or otherwise, run the patch, and observe that nothing catches fire) |
@gmaxwell I mean it could have a functional test or something. |
I sure hope that when people say they've tested a PR it doesn't mean they just ran its unit test... |
I hope too, but a test would be a nice addition no? |
Nit: Do we care about the object slicing going on here (slicing from (Note: Slicing was present in this code also before this patch.) |
utACK 054d01d |
Heh. Indeed. |
I don't hope so either. Would make sense to extend the definition of ACKs in (not trying to say that running the unit+functional tests locally isn't useful! travis cannot possible cover all possible combinations of hardware and software) utACK 054d01d |
054d01d Do not relay banned IP addresses (Pieter Wuille) Pull request description: Tree-SHA512: 538c43781c789949e1ae566533e76835d478e40e8ba6427b22234ee611cb4a311b2940a214e37c1e9c9afe28a6814a00d490a39e3580bb5ebd85b03e95040246
My comment was about having this new behavior checked, not about how reviews should be done. |
0d9d2b3 Doc: update ACK description in CONTRIBUTING.md (Jon Atack) Pull request description: as per #15617 (comment). Edit: as per #15617 (comment) and #15626 (comment). Tree-SHA512: 12df420d20338270bca310873c73d2f38b631c05cf8b3e5b2c1380f95936cb122687ba66b71de53348222efd5fed6d21e67f535a6ada689bf294dceec184a631
utACK |
Github-Pull: bitcoin#15617 Rebased-From: 054d01d Tree-SHA512: 2c47cf823cc51aee5a224513a0ca2fd1132f4c567d255ead661e88f009dc5d1db73da79b5e65a63b11b222e17292fdff9035a93cb2e53215d9bbb21a5bce7a41
Summary: Backport of Core [[bitcoin/bitcoin#15617 | PR15617]] Test Plan: ninja check check-functional Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D6212
You guys realize -- this is a DoS vector. This commit introduces effectively a quadratic loop for What's worse, the ban table can be manipulated and is unbounded in size -- anybody with enough IP addresses can grow it on any target node they can connect to -- to tens of thousands of entries. This is especially true if using IPv6 where thousands of IP addresses are easily obtained by people with even modest resources. See RFC3177 - Recommendations on IPv6 Address Allocations to Sites I was able to manipulate the ban table on my testnet node. I added some debug/printing to my local build. This is to service just 1 GETADDR message:
|
Summary --- This is a backport of D6212 but adapted to the new "discouragement filter" API in !555. It depends on !555 (it is a commit on top of that MR). Adapted (partial) backport of: - Core [[bitcoin/bitcoin#15617 | PR15617]] - Core [[bitcoin/bitcoin#19219 | PR19219]] - Differential Revision: https://reviews.bitcoinabc.org/D6212 Test Plan: --- ninja check check-functional
054d01d Do not relay banned IP addresses (Pieter Wuille) Pull request description: Tree-SHA512: 538c43781c789949e1ae566533e76835d478e40e8ba6427b22234ee611cb4a311b2940a214e37c1e9c9afe28a6814a00d490a39e3580bb5ebd85b03e95040246
054d01d Do not relay banned IP addresses (Pieter Wuille) Pull request description: Tree-SHA512: 538c43781c789949e1ae566533e76835d478e40e8ba6427b22234ee611cb4a311b2940a214e37c1e9c9afe28a6814a00d490a39e3580bb5ebd85b03e95040246
0d9d2b3 Doc: update ACK description in CONTRIBUTING.md (Jon Atack) Pull request description: as per bitcoin#15617 (comment). Edit: as per bitcoin#15617 (comment) and bitcoin#15626 (comment). Tree-SHA512: 12df420d20338270bca310873c73d2f38b631c05cf8b3e5b2c1380f95936cb122687ba66b71de53348222efd5fed6d21e67f535a6ada689bf294dceec184a631
054d01d Do not relay banned IP addresses (Pieter Wuille) Pull request description: Tree-SHA512: 538c43781c789949e1ae566533e76835d478e40e8ba6427b22234ee611cb4a311b2940a214e37c1e9c9afe28a6814a00d490a39e3580bb5ebd85b03e95040246
0d9d2b3 Doc: update ACK description in CONTRIBUTING.md (Jon Atack) Pull request description: as per bitcoin#15617 (comment). Edit: as per bitcoin#15617 (comment) and bitcoin#15626 (comment). Tree-SHA512: 12df420d20338270bca310873c73d2f38b631c05cf8b3e5b2c1380f95936cb122687ba66b71de53348222efd5fed6d21e67f535a6ada689bf294dceec184a631
054d01d Do not relay banned IP addresses (Pieter Wuille) Pull request description: Tree-SHA512: 538c43781c789949e1ae566533e76835d478e40e8ba6427b22234ee611cb4a311b2940a214e37c1e9c9afe28a6814a00d490a39e3580bb5ebd85b03e95040246
0d9d2b3 Doc: update ACK description in CONTRIBUTING.md (Jon Atack) Pull request description: as per bitcoin#15617 (comment). Edit: as per bitcoin#15617 (comment) and bitcoin#15626 (comment). Tree-SHA512: 12df420d20338270bca310873c73d2f38b631c05cf8b3e5b2c1380f95936cb122687ba66b71de53348222efd5fed6d21e67f535a6ada689bf294dceec184a631
0d9d2b3 Doc: update ACK description in CONTRIBUTING.md (Jon Atack) Pull request description: as per bitcoin#15617 (comment). Edit: as per bitcoin#15617 (comment) and bitcoin#15626 (comment). Tree-SHA512: 12df420d20338270bca310873c73d2f38b631c05cf8b3e5b2c1380f95936cb122687ba66b71de53348222efd5fed6d21e67f535a6ada689bf294dceec184a631
0d9d2b3 Doc: update ACK description in CONTRIBUTING.md (Jon Atack) Pull request description: as per bitcoin#15617 (comment). Edit: as per bitcoin#15617 (comment) and bitcoin#15626 (comment). Tree-SHA512: 12df420d20338270bca310873c73d2f38b631c05cf8b3e5b2c1380f95936cb122687ba66b71de53348222efd5fed6d21e67f535a6ada689bf294dceec184a631
0d9d2b3 Doc: update ACK description in CONTRIBUTING.md (Jon Atack) Pull request description: as per bitcoin#15617 (comment). Edit: as per bitcoin#15617 (comment) and bitcoin#15626 (comment). Tree-SHA512: 12df420d20338270bca310873c73d2f38b631c05cf8b3e5b2c1380f95936cb122687ba66b71de53348222efd5fed6d21e67f535a6ada689bf294dceec184a631
0d9d2b3 Doc: update ACK description in CONTRIBUTING.md (Jon Atack) Pull request description: as per bitcoin#15617 (comment). Edit: as per bitcoin#15617 (comment) and bitcoin#15626 (comment). Tree-SHA512: 12df420d20338270bca310873c73d2f38b631c05cf8b3e5b2c1380f95936cb122687ba66b71de53348222efd5fed6d21e67f535a6ada689bf294dceec184a631
054d01d Do not relay banned IP addresses (Pieter Wuille) Pull request description: Tree-SHA512: 538c43781c789949e1ae566533e76835d478e40e8ba6427b22234ee611cb4a311b2940a214e37c1e9c9afe28a6814a00d490a39e3580bb5ebd85b03e95040246
No description provided.