zaino serve gRPC: bind loopback, not 0.0.0.0 - #56
Open
Giri-Aayush wants to merge 1 commit into
Open
Conversation
The embedded zaino serves its gRPC on 0.0.0.0:P+10001 while the JSON-RPC one line above binds 127.0.0.1. On a faucet node that gRPC serves RequestFaucetDonation, a direct path to the mining wallet that bypasses any operator-side rate limiting, so exposing it on all interfaces is a wallet-drain risk that only a firewall stands in front of. There is no config knob for the bind, so this is the one-line fix: match the JSON-RPC and bind loopback.
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found this while auditing which ports a faucet node exposes.
How we found it
Listed the listeners on the box and spotted
*:29234(the zaino serve gRPC, atP+10001) bound to0.0.0.0, while the JSON-RPC one line above it in the source binds127.0.0.1. That mismatch is the tell.The reason it matters: that gRPC serves
RequestFaucetDonation, which pays straight out of the mining wallet and skips any operator-side rate limiting. So an all-interfaces bind on that port is a direct wallet-drain path the moment a firewall slips. Right now only ufw is standing in front of it.Went looking for a config knob to move it to loopback and there isn't one, the address is hardcoded in
start.rs. So this is the one-line fix: make the gRPC bind match the JSON-RPC and sit on loopback.Testing
Deployed on a live feature-net node.
ss -lntpnow shows127.0.0.1:29234and the node runs normally.