HistoryEditJSON (OSV)

RUSTSEC-2020-0165

mozjpeg DecompressScanlines::read_scanlines is Unsound

Reported
Issued
Package
mozjpeg (crates.io)
Type
INFO Unsound
Categories
Keywords
#type-confusion
Aliases
References
Patched
  • >=0.8.19
Affected Functions
Version
mozjpeg::DecompressScanlines::read_scanlines
  • <0.8.19

Description

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:

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

Advisory available under CC0-1.0 license.