Skip to content

Clamp Forknote2 merge-mining depth during deserialize#27

Merged
MoneroOcean merged 1 commit into
masterfrom
codex/propose-a-fix-for-forknote2-vulnerability
May 29, 2026
Merged

Clamp Forknote2 merge-mining depth during deserialize#27
MoneroOcean merged 1 commit into
masterfrom
codex/propose-a-fix-for-forknote2-vulnerability

Conversation

@MoneroOcean
Copy link
Copy Markdown
Owner

Motivation

  • Prevent untrusted tx_extra_merge_mining_tag.depth from causing unbounded std::vector allocation during Forknote2 parent-block deserialization, which can be triggered by daemon-controlled block templates and lead to OOM/abort.

Description

  • Add a defensive check in src/cryptonote_basic/cryptonote_basic.h that returns false if mm_tag.depth exceeds MAX_MERGE_MINING_DEPTH (set to 128) before calling PREPARE_CUSTOM_VECTOR_SERIALIZATION(mm_tag.depth, ...), rejecting malformed inputs early.

Testing

  • No automated build or unit test suite was run in this environment; the patch was applied and committed successfully (git commit completed).

Codex Task

@MoneroOcean MoneroOcean merged commit c8e0e75 into master May 29, 2026
3 checks passed
@MoneroOcean MoneroOcean deleted the codex/propose-a-fix-for-forknote2-vulnerability branch May 29, 2026 18:08
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