Skip to content

Add advisory for solana_rbpf: OOB pointer arithmetic in invoke_function#2921

Open
DiuDiu777 wants to merge 1 commit into
rustsec:mainfrom
DiuDiu777:solana-rbpf-invoke-function-advisory
Open

Add advisory for solana_rbpf: OOB pointer arithmetic in invoke_function#2921
DiuDiu777 wants to merge 1 commit into
rustsec:mainfrom
DiuDiu777:solana-rbpf-invoke-function-advisory

Conversation

@DiuDiu777
Copy link
Copy Markdown

@DiuDiu777 DiuDiu777 commented May 28, 2026

Affected crate(s)

  • solana_rbpf (362,603 recent downloads per crates.io; 4,761,947 total downloads)

Links to upstream issue(s) or PR(s)

The upstream repository is archived, so I cannot report this through the normal upstream issue tracker.

Severity

Informational soundness issue. Safe Rust code can construct an EbpfVm and call the safe method EbpfVm::invoke_function, which performs out-of-bounds pointer arithmetic internally.

The affected implementation casts self to *mut u64 and applies a randomized offset from get_runtime_environment_key() using ptr::offset. This can move the pointer outside the allocation containing the EbpfVm, causing undefined behavior before the supplied builtin function is invoked. Miri reports an in-bounds pointer arithmetic violation. No unsafe code is required from the caller.

Checklist

  • Advisory filename(s) starts with RUSTSEC-0000-0000 as the ID
  • date field is set to the public disclosure date
  • Contains a concise and descriptive title after advisory metadata
  • Asked maintainer(s) if publishing an advisory is appropriate

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.

1 participant