fix: RPC denial-of-service mitigations#83
Open
R0BC0D3R wants to merge 3 commits into
Open
Conversation
…tion Transactions with tx_extra exceeding 1060 bytes are rejected at the mempool level (kept_by_block transactions are exempt for sync compatibility). The limit covers mandatory content for 16 outputs plus 32 bytes of custom data per recipient. RPC send_raw_transaction now reports tx_extra_too_big and the RPC minor version is bumped to 3.1. Ported from monero-project/monero PR #8784 (v0.18.2.2).
Restricted RPC now rejects output distribution requests for pre-RCT (non-zero amount) outputs, preventing expensive enumeration queries from exhausting public node resources. RCT output distribution (amount zero) remains accessible. Also adds CORE_RPC_ERROR_CODE_RESTRICTED (-14) which was missing from Nerva's error codes. Ported from monero-project/monero PR #8084 (v0.17.3.0).
Tracks total bytes received per HTTP connection and rejects requests exceeding MAX_RPC_CONTENT_LENGTH (1048576 bytes) before processing. The limit is applied at the epee HTTP handler level, covering all RPC endpoints uniformly. Ported from monero-project/monero PR #8276 (v0.17.3.2).
Build Artifacts
10 succeeded, 0 failed | View workflow run |
ngeojiajun
approved these changes
May 16, 2026
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.
Summary
Backports three upstream Monero security fixes targeting RPC denial-of-service
attack vectors:
tx_extra size limit in mempool (PR #8784, v0.18.2.2)
tx_extra_too_bigresponse fieldget_output_distribution DoS fix (PR #8084, v0.17.3.0)
(non-zero amount) outputs
RPC input size limit (PR #8276, v0.17.3.2)
Test plan