Advisory

RUSTSEC-2021-0122

Also known as: GHSA-3jch-9qgp-4844

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.

Severity

Critical Basis: CVSS v3 score 9.8, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Dates

Published
2021-10-31 12:00 UTC
Modified
2023-11-08 04:14 UTC

Affected packages and fixes

flatbuffers

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 22.9.29 (semver)

Fixed versions

22.9.29

Fix

  • Fixed version 22.9.29
    cargo update -p flatbuffers --precise 22.9.29

Fix 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

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences