flatbuffers
Affected
- introduced
0.4.0, fixed2.0.0(semver)
Fixed versions
2.0.0
Fix
- Fixed version
2.0.0cargo update -p flatbuffers --precise 2.0.0
Advisory
Also known as: CVE-2020-35864, GHSA-c9h5-hf8r-m97x
read_scalar and read_scalar_at allow transmuting values without unsafe blocks
The read_scalar and read_scalar_at functions are unsound
because they allow transmuting values without unsafe blocks.
The following example shows how to create a dangling reference:
fn main() {
#[derive(Copy, Clone, PartialEq, Debug)]
struct S(&'static str);
impl flatbuffers::EndianScalar for S {
fn to_little_endian(self) -> Self { self }
fn from_little_endian(self) -> Self { self }
}
println!("{:?}", flatbuffers::read_scalar::<S>(&[1; std::mem::size_of::<S>()]));
}High Basis: CVSS v3 score 7.5, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
0.4.0, fixed 2.0.0 (semver)2.0.0
2.0.0cargo update -p flatbuffers --precise 2.0.0Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: RustSec Advisory Database · CC0-1.0