GitHub Advisoryadvisory · crates.io

GHSA-gx73-2498-r55c Unsound casting in flatbuffers

CRITICAL Published 2021-08-25 Modified 2023-06-13 Official page ↗
Aliases
CVE-2019-25004
Ecosystem
crates.io
Packages
flatbuffers
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-704
Reviewed
2021-08-19

Affected packages

• crates.io flatbuffers: >= 0.4.0, < 0.6.1 → fixed in 0.6.1

Description

The implementation of impl Follow for bool allows to reinterpret arbitrary bytes as a bool. In Rust bool has stringent requirements for its in-memory representation. Use of this function allows to violate these requirements and invoke undefined behaviour in safe code.

Related

Alias · CVE (1)

  • CVE-2019-25004 An issue was discovered in the flatbuffers crate before 0.6.1 for Rust. vulnerability

Weakness · CWE (1)

  • CWE-704 Incorrect Type Conversion or Cast weakness

References