Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 907385 (CVE-2023-2804) - <media-libs/libjpeg-turbo-3.0.0: buffer overflow in lossless 12-bit image parsing
Summary: <media-libs/libjpeg-turbo-3.0.0: buffer overflow in lossless 12-bit image par...
Status: CONFIRMED
Alias: CVE-2023-2804
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Security
URL:
Whiteboard: A3 [stable glsa?]
Keywords:
Depends on: 913822
Blocks:
  Show dependency tree
 
Reported: 2023-05-29 20:37 UTC by John Helmert III
Modified: 2024-10-04 06:31 UTC (History)
1 user (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 2023-05-29 20:37:15 UTC
CVE-2023-2804 (https://github.com/libjpeg-turbo/libjpeg-turbo/issues/668#issuecomment-1492586118):

A heap-based buffer overflow issue was discovered in libjpeg-turbo in h2v2_merged_upsample_internal() function of jdmrgext.c file. The vulnerability can only be exploited with 12-bit data precision for which the range of the sample data type exceeds the valid sample range, hence, an attacker could craft a 12-bit lossless JPEG image that contains out-of-range 12-bit samples. An application attempting to decompress such image using merged upsampling would lead to segmentation fault or buffer overflows, causing an application to crash.

Patched in main: https://github.com/libjpeg-turbo/libjpeg-turbo/commit/9f756bc67a84d4566bf74a0c2432aa55da404021
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-17 02:39:50 UTC
I don't get why, but we don't seem to have jdlossls.c in our /var/tmp/portage/media-libs/libjpeg-turbo-2.1.5.1-r1/work/libjpeg-turbo-2.1.5.1.

Maybe I'm too tired :)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-05 04:27:30 UTC
The 3.0.0 release notes mention this, but it's currently unkw'd because of test failures:

commit 626886cfd7f73d2440495ac1b8613b0eff27dbfa
Author: Sam James <sam@gentoo.org>
Date:   Mon Jul 3 21:38:15 2023 +0100

    media-libs/libjpeg-turbo: add 3.0.0 (unkeyworded)

    Unkeyworded because of test failures.

    Signed-off-by: Sam James <sam@gentoo.org>