Remove Loki tx_extra support and harden vector deserializer#39
Open
MoneroOcean wants to merge 2 commits into
Open
Remove Loki tx_extra support and harden vector deserializer#39MoneroOcean wants to merge 2 commits into
MoneroOcean wants to merge 2 commits into
Conversation
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.
Motivation
tx_extratypes exposed attacker-controlledstd::vectorcounts that could trigger largereserveallocations during parsing.tx_extratypes both removes the attack surface and simplifies maintenance.Description
tx_extraconstants, types, serializers, and variant registrations insrc/cryptonote_basic/tx_extra.hso those tags are no longer recognized by the parser.BLOB_TYPE_CRYPTONOTE_LOKIenum entry fromsrc/cryptonote_config.hand updated code paths that previously referenced Loki.XTNC-specific symbols (xtnc_version/xtnc_type) and limited XTNC/transaction-type branches toBLOB_TYPE_CRYPTONOTE_XTNCinsrc/cryptonote_basic/cryptonote_basic.handsrc/main.cc.v.reserve(cnt)call fromsrc/serialization/vector.h, preventing attacker-controlled counts from causing large premature allocations.Testing
rgsearches for Loki/service-node/key-image symbols and confirmed no remaining matches (search returned no hits). (succeeded)git diff --checkto validate whitespace/diff issues. (succeeded)npm testbut it was blocked by registry access errors (403 Forbiddenfetchingbech32), so full JS test execution could not complete. (blocked)Codex Task