Skip to content

fix(aptos): reject nil tx entries in AccountTransactionsReply [PLEX-2889]#2017

Open
Fletch153 wants to merge 2 commits intomainfrom
fletch/PLEX-2889-aptos-nil-tx-reject
Open

fix(aptos): reject nil tx entries in AccountTransactionsReply [PLEX-2889]#2017
Fletch153 wants to merge 2 commits intomainfrom
fletch/PLEX-2889-aptos-nil-tx-reject

Conversation

@Fletch153
Copy link
Copy Markdown
Contributor

@Fletch153 Fletch153 commented Apr 30, 2026

Summary

  • ConvertTransactionFromProto(nil) returns (nil, nil), so ConvertAccountTransactionsReplyFromProto silently produced a slice containing nil transactions when a relayer reply contained nil entries.
  • Downstream TxInfoRetriever.scanTransactions (in capabilities) dereferences tx.Data with no nil check — a malicious or buggy relayer could panic the capability.
  • Reject any nil converted transaction at the converter boundary with an indexed error.

PLEX-2889

Test plan

  • go test ./pkg/chains/aptos/... passes
  • New test asserts indexed error on nil entry

…889]

ConvertTransactionFromProto(nil) returns (nil, nil), which let
ConvertAccountTransactionsReplyFromProto silently produce a slice
containing nil transactions. Downstream callers (capability scan,
GetTransmitterTransactions) dereference these without checking,
crashing if a malicious or buggy relayer sends nil entries.

Reject nil protoTx with an indexed error instead.
@github-actions
Copy link
Copy Markdown

👋 Fletch153, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

📊 API Diff Results

No changes detected for module github.com/smartcontractkit/chainlink-common

View full report

Equivalent guard but reads naturally as "did the conversion produce
a usable transaction" — also catches future converter changes that
might return nil for non-nil input.
@Fletch153 Fletch153 changed the title fix(aptos): reject nil tx entries in AccountTransactionsReply [PLEX-2… fix(aptos): reject nil tx entries in AccountTransactionsReply [PLEX-2889] Apr 30, 2026
@Fletch153 Fletch153 changed the base branch from main to bugfix/audit_db April 30, 2026 11:15
@Fletch153 Fletch153 requested review from a team as code owners April 30, 2026 11:15
@Fletch153 Fletch153 requested review from AmrMohamedRezk, KodeyThomas, agusaldasoro, carte7000, chris-de-leon-cll, tt-cll and winder and removed request for a team April 30, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants