GHSA-v8gq-5grq-9728 mozjpeg DecompressScanlines::read_scanlines is Unsound
Unknown
- Published
- Updated
- Exploit status
- No public exploit known
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:
Tcontains a reference type, and it constructs a pointer to an invalid, arbitrary memory address.Trequires 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.
Upgrade path
1 package: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| crates.io mozjpeg(crates.io) | < 0.8.19; >= 0.0.0-0, < 0.8.19 | 0.8.19 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| crates.io mozjpeg(crates.io) | < 0.8.19 | 0.8.19 |
| crates.io mozjpeg(crates.io) | >= 0.0.0-0, < 0.8.19 | 0.8.19 |
References
- github.com issue-tracking
- github.com product
- rustsec.org vendor-advisory
- crates.io product
- github.com issue-tracking
- rustsec.org vendor-advisory
- github.com