Skip to content

Conversation

@luke-jr
Copy link
Member

@luke-jr luke-jr commented Jan 17, 2019

Details regarding a local MITM attack on the RPC service (executable by different users on the same machine)

(In addition to the notice here, it probably also makes sense to merge some of this advice to Core's docs.)

@laanwj
Copy link
Member

laanwj commented Jan 17, 2019

ACK

FWIW, this is a general problem with services using non-privileged ports.
It's unfortunate that we weren't able to fix bitcoin/bitcoin#14968 as it would have at least made error reporting better.

Copy link
Contributor

@harding harding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ACK 63b4ad0 . I have some nits and a line I'd like removed, but they can be dealt with post-merge.

excerpt: >
A full disclosure of the impact of CVE-2018-20587, affecting all released
versions of Bitcoin Core, including the latest 0.17.1. Includes workarounds
to mitigate risks.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the excerpt is cut off at "to miti..." (I don't care whether this is fixed, but you might care).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "Disclosure of the impact and mitigation of CVE-2018-20587, affecting all released versions of Bitcoin Core, including the latest 0.17.1." ? Would that fit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, it fits.


You may be affected by this issue if you have the RPC service enabled (default, with the headless bitcoind), and other users have access to run their own services on the same computer (either local or remote access).
If you are the only user of the computer running your node, you are not affected.
If you use the GUI but have not enabled the RPC service, you are not affected.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the source text, this is formatted like three separate items (e.g. bullet points), but this is rendered as a single paragraph. I just want to make sure that's your intention. Preview:

2019-01-17-17_15_27_706263960

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I prefer one-line-per-sentence simply for diff readability. A single paragraph is the intended end-user presentation.

- 2018-12-14 Bui Thanh recommends that Bitcoin Core should not silently ignore failures to bind RPC listening ports.
- 2018-12-15 Wladimir J. van der Laan submits pull request #14968 to fix the issue.
- 2018-12-28 Due to the fix proposed in #14968 breaking the RPC service working on IPv4-only systems, and no straightforward way to resolve both issues, the fix is deferred.
- 2018-12-30 A complex and experimental solution to fix both issues is released in Bitcoin Knots 0.17.1.knots20181229.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Information about Knots is not relevant to this website, please remove this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is. Far more than Bcash ABC, which has been included in similar contexts. Knots is part of Bitcoin, and a stepping stone to hopefully getting the fix into Core.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is a Bitcoin Core PR that attempts to get this solution (I dont even know what it is?) upstream, then we can include that. Just the fact that someone, somewhere, wrote a patch they think addresses an issue is not worth putting in a timeline.

@harding
Copy link
Contributor

harding commented Jan 17, 2019

Should this be merged now, or are we waiting on something else?

@jnewbery
Copy link
Contributor

Agree that the reference to knots should be removed. It's frustrating that we have the same conversation about that over and over again.

@luke-jr
Copy link
Member Author

luke-jr commented Jan 18, 2019

@jnewbery What's frustrating is that some people feel the need to repeatedly troll with some irrational anti-Knots bigotry, while at the same time including scams like "Bitcoin ABC".

@luke-jr
Copy link
Member Author

luke-jr commented Jan 18, 2019

Excerpt fixed.

@harding
Copy link
Contributor

harding commented Jan 18, 2019

Controversial text aside, is this ready for merge or is it waiting for some additional approval?

@practicalswift
Copy link

What policy are we following when choosing which CVE:s we post information about on the site?

@TheBlueMatt
Copy link
Contributor

TheBlueMatt commented Jan 18, 2019

NACK. This is not the right place for this. This should be in documentation telling people how to safely use the RPC interface (we've always said that making RPC accessible to untrusted parties is unsafe). Putting it up as a blog post just means people will forget about it/miss it.

@TheBlueMatt
Copy link
Contributor

TheBlueMatt commented Jan 18, 2019

I'm not aware of some "anti-Knots bigotry". No one is against Knots, but there is an expectation that things referenced on bitcoincore.org are either (a) sufficiently relevant to merit inclusion or (b) a sufficiently overlapping set of regular Bitcoin Core contributors contribute to the project that we may be willing to consider it supported. Sadly, Knots doesn't have many contributors, that doesn't mean its a bad idea or that people are against it, but it does mean that "Bitcoin Core" doesn't support it and, as a project, should be careful to recommend it. This would be just as true whether it was maintained by Wladimir as you, Luke.

CVE-2018-20587 is a Incorrect Access Control vulnerability that affects all currently released versions of Bitcoin Core, including the latest 0.17.1.

You may be affected by this issue if you have the RPC service enabled (default, with the headless bitcoind), and other users have access to run their own services on the same computer (either local or remote access).
If you are the only user of the computer running your node, you are not affected.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is understated - sure, the discovery of this particular bug doesn't change this a ton, but you still have a lot of risk from other software running on your computer which can access your RPC port. Can we make this a much broader "risks when using RPC port" post? There was also the previous discussion a few months ago where some wallet was telling users to expose their RPC port to the internet which merits discussion.

@luke-jr
Copy link
Member Author

luke-jr commented Jan 18, 2019

@practicalswift All involved in triage of this CVE agreed posting publicly on it (in one form or another) was among the most effective ways to mitigate it.

@TheBlueMatt I already said at the start, that Core docs should have some of this merged in. But quietly adding it to docs won't get much attention, and so doing both only makes sense if we're serious about having people act on it.

there is an expectation that things referenced on bitcoincore.org are either (a) sufficiently relevant to merit inclusion or (b) a sufficiently overlapping set of regular Bitcoin Core contributors contribute to the project that we may be willing to consider it supported.

Both criteria are met here. (a) Knots is directly relevant since it provides an experimental fix that users can deploy and test immediately, hopefully resulting in any issues being addressed before a merge and release in Core. (b) Everyone who contributes to Core is also contributing to Knots, and Knots provides testing for things eventually merged into Core. The only difference is the policy for doing merges.

@harding
Copy link
Contributor

harding commented Jan 19, 2019

Let's ignore the Knots drama. If it's still there when there's otherwise agreement that this PR should be merged, I can just open a separate PR based upon this one with an additional commit that removes the Knots stuff and merge that. I've done that before, e.g. #609

I'm a fan of updating the documentation in the Bitcoin Core docs/ directory and putting something into the release notes instead of publishing a long blog post that basically says that using a computer not under your exclusive control is unsafe---something that's always been true, even if there is now another known way to exploit that fundamental vulnerability via port binding. I'll put that on my Monday todo list. (Regardless, I'm still willing to merge this, but with @TheBlueMatt's NACK, I think it needs additional support first.)

@TheBlueMatt
Copy link
Contributor

TheBlueMatt commented Jan 19, 2019 via email

laanwj added a commit to bitcoin/bitcoin that referenced this pull request Jan 24, 2019
5a5ea93 Doc: add information about security to the JSON-RPC doc (David A. Harding)

Pull request description:

  This documents some information about using the RPC interface securely, as suggested in bitcoin-core/bitcoincore.org#637 by @luke-jr and @TheBlueMatt.  I think it should fit in well with #14458, but is not dependent on it (and shouldn't have any significant merge conflicts with it).

Tree-SHA512: e09d82c3029ed17a8bcf50722ea25a8c6c514731f3bce01908cbb6fe48bc96a3068a025beabebc602d18e1bc0dc3f2602848abc05dca1d3efe2a988ee50068c0
@luke-jr luke-jr closed this Feb 7, 2019
@luke-jr
Copy link
Member Author

luke-jr commented Feb 7, 2019

Core docs are updated. Discussion at meeting today, sounds like the general feeling is not to have a dedicated blog post for it.

PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
…RPC doc

5a5ea93 Doc: add information about security to the JSON-RPC doc (David A. Harding)

Pull request description:

  This documents some information about using the RPC interface securely, as suggested in bitcoin-core/bitcoincore.org#637 by @luke-jr and @TheBlueMatt.  I think it should fit in well with bitcoin#14458, but is not dependent on it (and shouldn't have any significant merge conflicts with it).

Tree-SHA512: e09d82c3029ed17a8bcf50722ea25a8c6c514731f3bce01908cbb6fe48bc96a3068a025beabebc602d18e1bc0dc3f2602848abc05dca1d3efe2a988ee50068c0
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 11, 2021
…RPC doc

5a5ea93 Doc: add information about security to the JSON-RPC doc (David A. Harding)

Pull request description:

  This documents some information about using the RPC interface securely, as suggested in bitcoin-core/bitcoincore.org#637 by @luke-jr and @TheBlueMatt.  I think it should fit in well with bitcoin#14458, but is not dependent on it (and shouldn't have any significant merge conflicts with it).

Tree-SHA512: e09d82c3029ed17a8bcf50722ea25a8c6c514731f3bce01908cbb6fe48bc96a3068a025beabebc602d18e1bc0dc3f2602848abc05dca1d3efe2a988ee50068c0
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Sep 12, 2021
…RPC doc

5a5ea93 Doc: add information about security to the JSON-RPC doc (David A. Harding)

Pull request description:

  This documents some information about using the RPC interface securely, as suggested in bitcoin-core/bitcoincore.org#637 by @luke-jr and @TheBlueMatt.  I think it should fit in well with bitcoin#14458, but is not dependent on it (and shouldn't have any significant merge conflicts with it).

Tree-SHA512: e09d82c3029ed17a8bcf50722ea25a8c6c514731f3bce01908cbb6fe48bc96a3068a025beabebc602d18e1bc0dc3f2602848abc05dca1d3efe2a988ee50068c0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants