Advisory

RUSTSEC-2023-0021

Also known as: GHSA-ppjr-267j-5p9x

Summary

NULL pointer dereference in stb_image

Details

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.

Severity

Not rated by the source.

Dates

Published
2023-03-19 12:00 UTC
Modified
2023-11-08 04:21 UTC

Affected packages and fixes

stb_image

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.2.5 (semver)

Fixed versions

0.2.5

Fix

  • Fixed version 0.2.5
    cargo update -p stb_image --precise 0.2.5

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