rustsec-2021-0122
Vulnerability from osv_rustsec
Published
2021-10-31 12:00
Modified
2023-06-13 13:10
Summary
Generated code can read and write out of bounds in safe code
Details
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:
1. not expose flatbuffer generated code as part of their public APIs
2. audit their code and look for any usage of follow, push, or any method that uses them
(e.g. self_follow).
3. Carefully go through the crates' documentation to understand which "safe" APIs are not
intended to be used.
{
"affected": [
{
"database_specific": {
"categories": [],
"cvss": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"informational": null
},
"ecosystem_specific": {
"affected_functions": null,
"affects": {
"arch": [],
"functions": [],
"os": []
}
},
"package": {
"ecosystem": "crates.io",
"name": "flatbuffers",
"purl": "pkg:cargo/flatbuffers"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0-0"
},
{
"fixed": "22.9.29"
}
],
"type": "SEMVER"
}
],
"versions": []
}
],
"aliases": [
"GHSA-3jch-9qgp-4844"
],
"database_specific": {
"license": "CC0-1.0"
},
"details": "Code generated by flatbuffers\u0027 compiler is `unsafe` but not marked as such.\nSee https://github.com/google/flatbuffers/issues/6627 for details.\n\nFor example, if generated code is used to decode malformed or untrusted input,\nundefined behavior (and thus security vulnerabilities) is possible even without\nthe use of the `unsafe` keyword, [violating the the meaning of \"safe\"](https://doc.rust-lang.org/std/keyword.unsafe.html#the-different-meanings-of-unsafe) code;\n\nAll users that use generated code by `flatbuffers` compiler are recommended to:\n1. not expose flatbuffer generated code as part of their public APIs\n2. audit their code and look for any usage of `follow`, `push`, or any method that uses them\n (e.g. `self_follow`).\n3. Carefully go through the crates\u0027 documentation to understand which \"safe\" APIs are not\n intended to be used.",
"id": "RUSTSEC-2021-0122",
"modified": "2023-06-13T13:10:24Z",
"published": "2021-10-31T12:00:00Z",
"references": [
{
"type": "PACKAGE",
"url": "https://crates.io/crates/flatbuffers"
},
{
"type": "ADVISORY",
"url": "https://rustsec.org/advisories/RUSTSEC-2021-0122.html"
},
{
"type": "REPORT",
"url": "https://github.com/google/flatbuffers/issues/6627"
}
],
"related": [],
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Generated code can read and write out of bounds in safe code"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…