CVE-2020-25016
JSON

9.1critical

Out of bounds access in rgb

Severity
9.1critical CVSS:3.1 by NVD
Exploit likelihood
1.59% (higher than 76% of CVEs)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-g4rw-8m5q-6453RUSTSEC-2020-0029

Description

A safety violation was discovered in the rgb crate before 0.8.20 for Rust, leading to (for example) dereferencing of arbitrary pointers or disclosure of uninitialized memory. This occurs because structs can be treated as bytes for read and write operations.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
rgb (crates.io)from 0.5.4 before 0.8.20GitHub Advisory Database, RustSec Advisory Database
rgb-rust_project rgb-rustbefore 0.8.20NVD

All scores

GitHub9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
RustSec Advisory Database9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
NVD9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
NVD6.4medium CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:N

Classification

What each source says

CVE List

A safety violation was discovered in the rgb crate before 0.8.20 for Rust, leading to (for example) dereferencing of arbitrary pointers or disclosure of uninitialized memory. This occurs because structs can be treated as bytes for read and write operations.

GitHub Advisory Database

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.

RustSec Advisory Database

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.

NVD (es)

Se detectó una violación de seguridad en la crate rgb versiones anteriores a 0.8.20 para Rust, conllevando a (por ejemplo) una desreferenciación de punteros arbitrarios o una divulgación de memoria no inicializada. Esto ocurre porque las estructuras pueden ser tratadas como bytes para operaciones de lectura y escritura

References

Sources

SourceRecordLicence
CVE ListCVE-2020-25016 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-g4rw-8m5q-6453 changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2020-0029 changed 2023-11-08CC0-1.0
NVDCVE-2020-25016 changed 2026-06-17Public domain