fix: F-2026-18198 | [Dual Defense] Solana Inbound Event Forgery Enables Unbacked Synthetic Minting - #308
Merged
Merged
Conversation
…ed (F-2026-18198)
… not silent (F-2026-18198)
…ogs were cut (F-2026-18198)
…n stack (F-2026-18198)
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.
F-2026-18198 Solana inbound event forgery
Issue
getSignaturesForAddress(gateway)returns any tx that merely references the gateway inaccountKeys.Program data:line whose 8 byte discriminator matched. A discriminator is a schema tag, not an authenticator.Approach taken
gatewayEmittedLogswalks the runtimeinvoke/success/failed:lines as a stack and accepts aProgram data:line only while the gateway is the executing frame.sol_logalways prefixesProgram log:andsol_log_dataalways prefixesProgram data:, so bare invoke/exit lines are runtime generated. Asserted in a test, not assumed.Program log: successpop a frame it did not own, so a gateway callee could steal attribution. Fixed by requiring the token before the verb to parse as a base58 pubkey.Log truncation
Detection only (
logsTruncated), deliberately. Measured 72,175 mainnet txs across 54 blocks: none truncated, p99 7,382 bytes, max 13,897. A gateway deposit is ~700 bytes. Reaching the cap means padding your own tx, which strands your own deposit for no gain, and cannot be done to someone else's.Tests