Advisory

GHSA-g4rw-8m5q-6453

Also known as: CVE-2020-25016, RUSTSEC-2020-0029

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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2021-08-25 20:45 UTC
Modified
2023-11-08 04:03 UTC

Affected packages and fixes

rgb

crates.io · All systems

Affected

  • introduced 0.5.4, fixed 0.8.20 (semver)

Fixed versions

0.8.20

Fix

  • Fixed version 0.8.20
    cargo update -p rgb --precise 0.8.20

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: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences