Skip to content

Bound untrusted block tx_hashes before merkle hashing#33

Merged
MoneroOcean merged 1 commit into
masterfrom
codex/fix-unbounded-transaction-stack-allocation
May 29, 2026
Merged

Bound untrusted block tx_hashes before merkle hashing#33
MoneroOcean merged 1 commit into
masterfrom
codex/fix-unbounded-transaction-stack-allocation

Conversation

@MoneroOcean
Copy link
Copy Markdown
Owner

Motivation

  • Prevent untrusted/remote block templates from triggering unbounded merkle-tree scratch allocations (via tree_hash) that can exhaust the process stack and cause a denial-of-service.

Description

  • Introduce MAX_BLOCK_TX_HASHES and return false from get_block_hashing_blob when b.tx_hashes.size() exceeds this limit to stop large attacker-controlled inputs from reaching tree_hash.

Testing

  • Ran the project test command npm test, which failed in this environment due to registry access (403 Forbidden fetching dependency bech32), so automated tests could not complete successfully.

Codex Task

@MoneroOcean MoneroOcean merged commit 4120595 into master May 29, 2026
3 checks passed
@MoneroOcean MoneroOcean deleted the codex/fix-unbounded-transaction-stack-allocation branch May 29, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant