Advisory

RUSTSEC-2020-0165

Also known as: GHSA-v8gq-5grq-9728

Summary

mozjpeg DecompressScanlines::read_scanlines is Unsound

Details

This issue and vector is similar to [RUSTSEC-2020-0029] of rgb crate which mozjpeg depends on.

Affected versions of mozjpeg crate allow creating instances of any type T from bytes,
and do not correctly constrain T to the types for which it is safe to do so.

Examples of safety violation possible for a type T:

  • T contains a reference type, and it constructs a pointer to an invalid, arbitrary memory address.
  • T requires a safety and/or validity invariant for its construction that may be violated.

The issue was fixed in 0.8.19 by using safer types and involving rgb dependency bump.

[RUSTSEC-2020-0029]: https://rustsec.org/advisories/RUSTSEC-2020-0029.html

Severity

Not rated by the source.

Dates

Published
2020-07-04 12:00 UTC
Modified
2023-11-08 04:23 UTC

Affected packages and fixes

mozjpeg

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.8.19 (semver)

Fixed versions

0.8.19

Fix

  • Fixed version 0.8.19
    cargo update -p mozjpeg --precise 0.8.19

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