PT-2022-12567 · Solana · Solana Rbpf
Lichtso
·
Published
2022-01-27
·
Updated
2023-04-26
·
CVE-2021-46102
CVSS v3.1
7.5
High
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Name of the Vulnerable Software and Affected Versions
Solana rBPF versions 0.2.14 through 0.2.16
Description
The issue is related to an integer overflow bug in the function "relocate" in the file src/elf.rs. This bug occurs because the sym.st value is read directly from the ELF file without checking. If the sym.st value is rather large, an integer overflow is triggered while calculating the variable
addr via addr = (sym.st value + refd pa) as u64.Recommendations
For Solana rBPF versions 0.2.14 through 0.2.16, consider disabling the "relocate" function in the file src/elf.rs as a temporary workaround until a patch is available. Restrict access to the vulnerable file src/elf.rs to minimize the risk of exploitation. Avoid using the variable
addr in the affected calculation until the issue is resolved. At the moment, there is no information about a newer version that contains a fix for this vulnerability.Exploit
Integer Overflow
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Solana Rbpf