Buffer Overflow Affecting solana_rbpf package, versions >=0.2.14 <0.2.17


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.32% (72nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUST-SOLANARBPF-2386861
  • published28 Jan 2022
  • disclosed28 Jan 2022
  • creditUnknown

Introduced: 28 Jan 2022

CVE-2021-46102  (opens in a new tab)
CWE-119  (opens in a new tab)
CWE-120  (opens in a new tab)

How to fix?

Upgrade solana_rbpf to version 0.2.17 or higher.

Overview

solana_rbpf is a virtual machine for eBPF program execution

Affected versions of this package are vulnerable to Buffer Overflow via the function relocate in the file src/elf.rs. The integer overflow stems from the sym.st_value which is read directly from ELF file without checking. If the sym.st_value is large, it triggers the overflow while calculating the variable addr via addr = (sym.st_value + refd_pa) as u64;.

CVSS Scores

version 3.1