PT-2020-17496 · Rust · Flatbuffers

Published

2020-04-11

·

Updated

2021-08-25

·

CVE-2020-35864

CVSS v3.1

7.5

High

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions flatbuffers crate through 2020-04-11 for Rust
Description An issue was discovered in the read scalar and read scalar at functions, which are unsound because they allow transmuting values without unsafe blocks. This can lead to creating dangling references. For example, the read scalar function can be used to create a dangling reference by implementing the EndianScalar trait for a custom struct and then using read scalar to read a value of that type.
Recommendations For the flatbuffers crate through 2020-04-11, consider avoiding the use of the read scalar and read scalar at functions until a patch is available, as they can be used to create dangling references. As a temporary workaround, consider adding unsafe blocks to these functions to prevent unsound transmutations. At the moment, there is no information about a newer version that contains a fix for this issue.

Exploit

Fix

Incorrect Type Conversion or Cast

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2020-35864
GHSA-C9H5-HF8R-M97X
RUSTSEC-2020-0009

Affected Products

Flatbuffers