Skip to content
OpenAdvisories
Medium · 5.3 CVE-2023-45667 EUVD-2023-49958

Null pointer dereference because of an uninitialized variable in stb_image

Published Oct 20, 2023 · Updated Feb 13, 2025 · Assigned by GitHub_M

Description

stb_image is a single file MIT licensed library for processing images.

If `stbi__load_gif_main` in `stbi_load_gif_from_memory` fails it returns a null pointer and may keep the `z` variable uninitialized. In case the caller also sets the flip vertically flag, it continues and calls `stbi__vertical_flip_slices` with the null pointer result value and the uninitialized `z` value. This may result in a program crash.

Affected products

VendorProductAffectedFixed
nothings stb <= 2.28 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libstb No fix yet —
Debian 13 libstb No fix yet —
Debian 12 libstb No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 libstb No fix yet —
Ubuntu 26.04 LTS libstb No fix yet —
Ubuntu 25.10 libstb No fix yet —
Ubuntu 24.04 LTS libstb No fix yet —
Ubuntu 22.04 LTS libstb No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS libstb No fix yet —
ReleasePackageFixed inAdvisory
Alpine v3.24 stb 0_git20231012-r0 —
Alpine v3.23 stb 0_git20231012-r0 —
Alpine v3.22 stb 0_git20231012-r0 —
Alpine v3.21 stb 0_git20231012-r0 —
Alpine v3.20 stb 0_git20231012-r0 —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 stb 0_git20231012-r0 —

References