Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 818556 (CVE-2021-28021, CVE-2021-42715, CVE-2021-42716) - dev-libs/stb: multiple vulnerabilities
Summary: dev-libs/stb: multiple vulnerabilities
Alias: CVE-2021-28021, CVE-2021-42715, CVE-2021-42716
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: Gentoo Security
Whiteboard: ~2 [ebuild]
Depends on:
Reported: 2021-10-17 03:06 UTC by John Helmert III
Modified: 2021-10-22 21:52 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description John Helmert III gentoo-dev Security 2021-10-17 03:06:04 UTC

Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a crafted JPEG file.
Comment 1 John Helmert III gentoo-dev Security 2021-10-22 21:52:12 UTC

An issue was discovered in stb stb_image.h 1.33 through 2.27. The HDR loader parsed truncated end-of-file RLE scanlines as an infinite sequence of zero-length runs. An attacker could potentially have caused denial of service in applications using stb_image by submitting crafted HDR files.

PR Patch:


An issue was discovered in stb stb_image.h 2.27. The PNM loader incorrectly interpreted 16-bit PGM files as 8-bit when converting to RGBA, leading to a buffer overflow when later reinterpreting the result as a 16-bit buffer. An attacker could potentially have crashed a service using stb_image, or read up to 1024 bytes of non-consecutive heap data without control over the read location.

PR Patch:

I'm absolutely baffled as to why these versions are in the CVE descriptions, only ALT Linux and something called "Rosa" seem to be using this scheme, but I don't see why they might be getting it from.

Neither patch is accepted yet.