Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 818556 (CVE-2021-28021, CVE-2021-37789, CVE-2021-42715, CVE-2021-42716, CVE-2022-28041, CVE-2022-28042, CVE-2022-28048) - <dev-libs/stb-20240201: multiple vulnerabilities
Summary: <dev-libs/stb-20240201: multiple vulnerabilities
Status: RESOLVED FIXED
Alias: CVE-2021-28021, CVE-2021-37789, CVE-2021-42715, CVE-2021-42716, CVE-2022-28041, CVE-2022-28042, CVE-2022-28048
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Security
URL: https://github.com/nothings/stb/issue...
Whiteboard: B2 [glsa+]
Keywords: PullRequest
Depends on: 926154
Blocks:
  Show dependency tree
 
Reported: 2021-10-17 03:06 UTC by John Helmert III
Modified: 2024-09-22 07:20 UTC (History)
5 users (show)

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


Attachments

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

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 archtester Gentoo Infrastructure gentoo-dev Security 2021-10-22 21:52:12 UTC
CVE-2021-42715:

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: https://github.com/nothings/stb/pull/1223

CVE-2021-42716:

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: https://github.com/nothings/stb/pull/1223

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.
Comment 2 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-04-16 05:00:52 UTC
CVE-2022-28048 (https://github.com/nothings/stb/pull/1297):
https://github.com/nothings/stb/issues/1293

STB v2.27 was discovered to contain an integer shift of invalid size in the component stbi__jpeg_decode_block_prog_ac.

CVE-2022-28041 (https://github.com/nothings/stb/pull/1297):
https://github.com/nothings/stb/issues/1292

stb_image.h v2.27 was discovered to contain an integer overflow via the function stbi__jpeg_decode_block_prog_dc. This vulnerability allows attackers to cause a Denial of Service (DoS) via unspecified vectors.

CVE-2022-28042 (https://github.com/nothings/stb/issues/1289):
https://github.com/nothings/stb/pull/1297

stb_image.h v2.27 was discovered to contain an heap-based use-after-free via the function stbi__jpeg_huff_decode.


None of these patches accepted, either.
Comment 3 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-11-02 14:53:12 UTC
CVE-2021-37789 (https://github.com/nothings/stb/issues/1178):

stb_image.h 2.27 has a heap-based buffer over in stbi__jpeg_load, leading to Information Disclosure or Denial of Service.
Comment 4 Larry the Git Cow gentoo-dev 2024-02-02 05:35:05 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be6768fc2448bb4a0f0aa1cc356cc36990d6cdfe

commit be6768fc2448bb4a0f0aa1cc356cc36990d6cdfe
Author:     Dennis Lamm <expeditioneer@gentoo.org>
AuthorDate: 2024-02-01 20:33:37 +0000
Commit:     Dennis Lamm <expeditioneer@gentoo.org>
CommitDate: 2024-02-02 05:35:00 +0000

    dev-libs/stb: add 20240201
    
    Bug: https://bugs.gentoo.org/818556
    Closes: https://bugs.gentoo.org/876034
    Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/35140
    Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org>

 dev-libs/stb/Manifest            |  1 +
 dev-libs/stb/stb-20240201.ebuild | 40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+)
Comment 5 Larry the Git Cow gentoo-dev 2024-03-04 11:16:33 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f79238339117499298e6bb5ae7fffce76b6231b

commit 5f79238339117499298e6bb5ae7fffce76b6231b
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2024-03-04 11:16:17 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2024-03-04 11:16:17 +0000

    dev-libs/stb: dropped obsolete 20200713
    
    Bug: https://bugs.gentoo.org/926154
    Bug: https://bugs.gentoo.org/818556
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 dev-libs/stb/Manifest            |  1 -
 dev-libs/stb/stb-20200713.ebuild | 34 ----------------------------------
 2 files changed, 35 deletions(-)
Comment 6 Miroslav Šulc gentoo-dev 2024-03-04 11:17:44 UTC
the tree is clean now, you can proceed.
Comment 7 Larry the Git Cow gentoo-dev 2024-09-22 07:20:26 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/data/glsa.git/commit/?id=36415befa5699b5ec0dcfdefe55f841ab0bf156f

commit 36415befa5699b5ec0dcfdefe55f841ab0bf156f
Author:     GLSAMaker <glsamaker@gentoo.org>
AuthorDate: 2024-09-22 07:19:29 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2024-09-22 07:20:24 +0000

    [ GLSA 202409-15 ] stb: Multiple Vulnerabilities
    
    Bug: https://bugs.gentoo.org/818556
    Signed-off-by: GLSAMaker <glsamaker@gentoo.org>
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 glsa-202409-15.xml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)