public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Adolf Belka <adolf.belka@ipfire.org>
To: development@lists.ipfire.org
Cc: Adolf Belka <adolf.belka@ipfire.org>
Subject: [PATCH] libjpeg: Update to version 3.2.1
Date: Wed,  4 Nov 2026 14:50:02 +0100	[thread overview]
Message-ID: <20261104135004.2059527-10-adolf.belka@ipfire.org> (raw)
In-Reply-To: <20261104135004.2059527-1-adolf.belka@ipfire.org>

- Update from version 3.2.0 to 3.2.1
- No change in rootfile
- 1 CVE fix
- Changelog
3.2.1
	1. Fixed a regression introduced by 3.2 beta1[9] that broke Un*x builds in
	 which position-independent code (PIC) was not enabled for static libraries.
	 This issue could be worked around by explicitly setting the
	 `CMAKE_POSITION_INDEPENDENT_CODE` CMake variable or using a toolchain, such as
	 the ones provided by Ubuntu, that automatically enables PIC.
	2. The RISC-V Vector (RVV) forward DCT modules now use strided segment load
	 intrinsics to simultaneously load sample rows from memory and transpose them
	 into columns, as well as multiply-accumulate intrinsics where appropriate.
	 When using the accurate integer DCT algorithm, RGB-to-baseline JPEG compression
	 is approximately 10-17% (avg. 13%) faster (relative to libjpeg-turbo 3.2.0)
	 with GCC 14 and 1-8% (avg. 4%) faster with Clang 20.  (Tested on a 1.6 GHz Ky
	 X1 CPU.  Actual mileage may vary.)
	3. Symbols from the in-tree zlib and libspng implementations introduced by
	 3.2 beta1[9] are now hidden, which prevents the symbols from being exposed in
	 downstream shared libraries and applications that link with the static
	 TurboJPEG API library.  Symbols from the in-tree zlib implementation are now
	 also renamed, which prevents downstream shared libraries and applications that
	 link with the static TurboJPEG API library from accidentally calling the
	 in-tree zlib implementation when they intend to call the system-supplied zlib
	 implementation.
	4. Fixed an integer overflow and subsequent buffer overrun that occurred when
	 attempting to use `tj3LoadImage12()` or `tj3LoadImage16()` from a 32-bit build
	 of libjpeg-turbo to load a packed-pixel image with more than 2^31 components.
	5. Fixed a division-by-zero error (CVE-2026-75466) that occurred when
	 attempting to load a non-grayscale indexed-color PNG image using
	 `tj3LoadImage*()` if the pixel format of the packed-pixel buffer was
	 unspecified (`TJPF_UNKNOWN`.)
	6. Fixed an issue whereby `tj3DecompressToYUV*()` produced incorrect
	 chrominance values when decompressing a 4:2:0, 4:1:0, or 2:4 JPEG image with
	 the "fast" IDCT algorithm and a scaling factor of 1/2.  (In other words,
	 `TJPARAM_FASTDCT` was not ignored as it should be when decompression scaling is
	 enabled.)
	7. Fixed a buffer overrun and subsequent segfault that occurred on certain
	 platforms when attempting to partially decompress a specially-crafted 4:2:0
	 JPEG image using the merged (non-fancy) upsampling algorithm with the
	 libjpeg-turbo SIMD extensions disabled and a cropping region that would have
	 caused any of the component planes to be cropped to a width of 1 or 2 samples.
	8. Hardened the libjpeg API against hypothetical applications that may
	 erroneously attempt to decompress a full-color 12-bit-per-sample JPEG image
	 with both one-pass color quantization and RGB565 color conversion enabled.
	 This could have caused a buffer overrun in one of the quantizer's color index
	 arrays.  The buffer overrun did not likely pose a security risk, since an
	 application that abused the API in the aforementioned manner could never work
	 properly.
	9. Fixed issues in `jpeg*_skip_scanlines()` whereby, when skipping certain
	 groups of scanlines while using a non-fancy (merged or plain) upsampling
	 algorithm with a vertical sampling factor greater than 1, the wrong number of
	 scanlines were skipped and/or skipped scanlines were returned in subsequent
	 calls to `jpeg*_read_scanlines()`.
	10. Hardened the TurboJPEG API against hypothetical applications that may
	 erroneously pass an invalid image to `tj3DecompressHeader()`, ignore a fatal
	 error thrown by that function, and attempt to call the function again with a
	 valid image.  Under certain circumstances, this could have caused the values of
	 `TJPARAM_JPEGWIDTH` and `TJPARAM_JPEGHEIGHT` to reflect the dimensions reported
	 in the invalid image's header rather than the valid image's header, which might
	 have caused the caller to allocate too small of a buffer to hold the
	 decompressed valid image.
	11. `tj3DecompressHeader()` now always removes the ICC profile (if any) that
	 was previously extracted into the TurboJPEG instance.  This addresses an
	 oversight in 3.2 beta1[10] whereby, if the same TurboJPEG instance was used to
	 decompress or transform multiple JPEG images, then `tj3GetICCProfile()` and
	 `tj3TransformBufSize()` behaved as if JPEG images with no ICC profile contained
	 the last ICC profile extracted.
	12. `tj3TransformBufSize()` has been improved in the following ways:
	     - The function now accounts for the size of all extra markers (including
	 comments, JFIF thumbnails, and Exif data) that will be copied from the source
	 image to the destination image, given the current value of
	 `TJPARAM_SAVEMARKERS` and the specified transform options.
	     - The function now returns accurate results regardless of the value of
	 `TJPARAM_SAVEMARKERS` at the time `tj3DecompressHeader()` was called.  This
	 reflects the fact that only the current value of `TJPARAM_SAVEMARKERS` and the
	 specified transform options affect the marker copying behavior in
	 `tj3Transform()`.
	13. Fixed issues in jpegtran that prevented a grayscale image from being
	 dropped into a subsampled input image or vice versa.
	14. Hardened the TurboJPEG API against hypothetical applications that may
	 erroneously attempt to use the same insufficiently large pre-allocated
	 destination buffer for multiple simultaneous transform operations in
	 `tj3Transform()`.  This caused a use-after-free issue, because the
	 caller-specified destination buffer was no longer valid after the first
	 transform operation reallocated it.
	15. Fixed multiple issues in the standalone (non-merged) RGB565 color
	 converters that occurred when attempting to decompress more than one scanline
	 at a time from a vertically subsampled JPEG image.  These issues caused a
	 buffer overrun and subsequent segfault if the output image rows were not 4-byte
	 aligned, the image width was 1, and both the vertical sampling factor and the
	 number of scanlines decompressed at a time were greater than 2.  In other
	 cases, the issues caused incorrect dithered output.  The issues could not be
	 reproduced using djpeg (which decompresses one scanline at a time) and were not
	 known to exist in any other applications.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 lfs/libjpeg | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lfs/libjpeg b/lfs/libjpeg
index 4dcfaf4f0..17c22c2f0 100644
--- a/lfs/libjpeg
+++ b/lfs/libjpeg
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = 3.2.0
+VER        = 3.2.1
 
 THISAPP    = libjpeg-turbo-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_BLAKE2 = c50c985f8b870ab6467181f69e10f3ec2705cb349613b9178b293f136063e302087832d87f793b3d24ab721a2f5d76271760bd244d0766ab3b8cbe48ebf50cfa
+$(DL_FILE)_BLAKE2 = eeae531ca1dd7665f72e97eb77d47f00251e965758cc6808434082b13c9ef193a86de9281a2e1c541339d00a8641d324452a8654c39e10c45530f5ea39175b5c
 
 install : $(TARGET)
 
-- 
2.56.0



  parent reply	other threads:[~2026-11-04 13:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 13:49 [PATCH] aprutil: Update to version 1.6.6 Adolf Belka
2026-11-04 13:49 ` [PATCH] core207: Ship aprutil Adolf Belka
2026-11-04 13:49 ` [PATCH] core207: Ship fribidi Adolf Belka
2026-11-04 13:49 ` [PATCH] core207: Ship kmod Adolf Belka
2026-11-04 13:49 ` [PATCH] core207: Ship libjpeg Adolf Belka
2026-11-04 13:49 ` [PATCH] core207: Ship nano Adolf Belka
2026-11-04 13:49 ` [PATCH] fribidi: Update to version 1.0.18 Adolf Belka
2026-11-04 13:50 ` [PATCH] kmod: Update to version 34.3 Adolf Belka
2026-11-04 13:50 ` [PATCH] libarchive: Update to version 3.8.11 Adolf Belka
2026-11-04 13:50 ` Adolf Belka [this message]
2026-11-04 13:50 ` [PATCH] nano: Update to version 9.3 Adolf Belka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261104135004.2059527-10-adolf.belka@ipfire.org \
    --to=adolf.belka@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox