GHSA-g4rw-8m5q-6453

Suggest an improvement
Source
https://github.com/advisories/GHSA-g4rw-8m5q-6453
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-g4rw-8m5q-6453/GHSA-g4rw-8m5q-6453.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-g4rw-8m5q-6453
Aliases
Published
2021-08-25T20:45:12Z
Modified
2023-11-08T04:03:09.114958Z
Severity
  • 9.1 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N CVSS Calculator
Summary
Out of bounds access in rgb
Details

Affected versions of rgb crate allow viewing and modifying data of any type T wrapped in RGB<T> as bytes, and do not correctly constrain RGB<T> and other wrapper structures to the types for which it is safe to do so.

Safety violation possible for a type wrapped in RGB<T> and similar wrapper structures:

  • If T contains padding, viewing it as bytes may lead to exposure of contents of uninitialized memory.
  • If T contains a pointer, modifying it as bytes may lead to dereferencing of arbitrary pointers.
  • Any safety and/or validity invariants for T may be violated.

The issue was resolved by requiring all types wrapped in structures provided by RGB crate to implement an unsafe marker trait.

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

Affected packages

crates.io / rgb

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.5.4
Fixed
0.8.20