GHSA-gx73-2498-r55c

Suggest an improvement
Source
https://github.com/advisories/GHSA-gx73-2498-r55c
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-gx73-2498-r55c/GHSA-gx73-2498-r55c.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-gx73-2498-r55c
Aliases
Published
2021-08-25T20:46:49Z
Modified
2023-11-08T04:01:32.107935Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Unsound casting in flatbuffers
Details

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.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-704"
    ],
    "severity": "CRITICAL",
    "github_reviewed": true,
    "github_reviewed_at": "2021-08-19T21:19:36Z"
}
References

Affected packages

crates.io / flatbuffers

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.4.0
Fixed
0.6.1

Ecosystem specific

{
    "affected_functions": [
        "flatbuffers::Follow::follow"
    ]
}