GHSA-ppjr-267j-5p9x
JSON

medium

NULL pointer derefernce in `stb_image`

Severity
medium rating by GitHub
Published
Last changed
Also known as
RUSTSEC-2023-0021

Description

A bug in error handling in the stb_image C library could cause a NULL pointer dereference when attempting to load an invalid or unsupported image file. This is fixed in version 0.2.5 and later of the stb_image Rust crate, by patching the C code to correctly handle NULL pointers.

Affected

Product or packageVersionsReported by
stb_image (crates.io)before 0.2.5, from 0.0.0-0 before 0.2.5GitHub Advisory Database, RustSec Advisory Database

Classification

What each source says

GitHub Advisory Database

A bug in error handling in the stb_image C library could cause a NULL pointer dereference when attempting to load an invalid or unsupported image file. This is fixed in version 0.2.5 and later of the stb_image Rust crate, by patching the C code to correctly handle NULL pointers.

RustSec Advisory Database

A bug in error handling in the stb_image C library could cause a NULL pointer dereference when attempting to load an invalid or unsupported image file. This is fixed in version 0.2.5 and later of the stb_image Rust crate, by patching the C code to correctly handle NULL pointers.

Thank you to GitHub user 0xdd96 for finding and fixing this vulnerability.

References

Sources

SourceRecordLicence
GitHub Advisory DatabaseGHSA-ppjr-267j-5p9x changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2023-0021 changed 2023-11-08CC0-1.0