9.8critical
Generated code can read and write out of bounds in safe code
- Severity
- 9.8critical CVSS:3.1 by GitHub
- Published
- Last changed
- Also known as
- RUSTSEC-2021-0122
Description
Code generated by flatbuffers' compiler is unsafe but not marked as such.
See https://github.com/google/flatbuffers/issues/6627 for details.
All users that use generated code by flatbuffers compiler are recommended to:
- not expose flatbuffer generated code as part of their public APIs
- audit their code and look for any usage of
follow,push, or any method that uses them (e.g.self_follow). - Carefuly go through the crates' documentation to understand which "safe" APIs are not intended to be used.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| flatbuffers (crates.io) | before 22.9.29, from 0.0.0-0 before 22.9.29 | GitHub Advisory Database, RustSec Advisory Database |
All scores
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| RustSec Advisory Database | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
What each source says
GitHub Advisory Database
Code generated by flatbuffers' compiler is unsafe but not marked as such.
See https://github.com/google/flatbuffers/issues/6627 for details.
All users that use generated code by flatbuffers compiler are recommended to:
- not expose flatbuffer generated code as part of their public APIs
- audit their code and look for any usage of
follow,push, or any method that uses them (e.g.self_follow). - Carefuly go through the crates' documentation to understand which "safe" APIs are not intended to be used.
RustSec Advisory Database
Code generated by flatbuffers' compiler is unsafe but not marked as such.
See https://github.com/google/flatbuffers/issues/6627 for details.
For example, if generated code is used to decode malformed or untrusted input,
undefined behavior (and thus security vulnerabilities) is possible even without
the use of the unsafe keyword, violating the the meaning of "safe" code;
All users that use generated code by flatbuffers compiler are recommended to:
- not expose flatbuffer generated code as part of their public APIs
- audit their code and look for any usage of
follow,push, or any method that uses them (e.g.self_follow). - Carefully go through the crates' documentation to understand which "safe" APIs are not intended to be used.
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-3jch-9qgp-4844 changed 2023-11-08 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2021-0122 changed 2023-11-08 | CC0-1.0 |