public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sandro Mani <manisandro@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/freeimage] epel10.3: Add downstream patches for CVE-2023-47997, CVE-2023-47995
Date: Wed, 18 Nov 2026 02:42:22 GMT	[thread overview]
Message-ID: <179496974285.1.3724789955182015692.rpms-freeimage-8beea291bdeb@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/freeimage
Branch : epel10.3
Commit : 8beea291bdeb83f5473c59e54eccc70974852ea8
Author : Sandro Mani <manisandro@gmail.com>
Date   : 2024-03-10T14:23:12+01:00
Stats  : +41/-4 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/freeimage/c/8beea291bdeb83f5473c59e54eccc70974852ea8?branch=epel10.3

Log:
Add downstream patches for CVE-2023-47997, CVE-2023-47995

---
diff --git a/CVE-2023-47995.patch b/CVE-2023-47995.patch
new file mode 100644
index 0000000..711ded3
--- /dev/null
+++ b/CVE-2023-47995.patch
@@ -0,0 +1,14 @@
+diff -rupN --no-dereference freeimage-svn-r1909-FreeImage-trunk/Source/FreeImage/PluginJPEG.cpp freeimage-svn-r1909-FreeImage-trunk-new/Source/FreeImage/PluginJPEG.cpp
+--- freeimage-svn-r1909-FreeImage-trunk/Source/FreeImage/PluginJPEG.cpp	2024-03-10 14:22:17.818579271 +0100
++++ freeimage-svn-r1909-FreeImage-trunk-new/Source/FreeImage/PluginJPEG.cpp	2024-03-10 14:22:18.776573816 +0100
+@@ -1086,6 +1086,10 @@ Load(FreeImageIO *io, fi_handle handle,
+ 
+ 			jpeg_read_header(&cinfo, TRUE);
+ 
++			if (cinfo->image_width > JPEG_MAX_DIMENSION || cinfo->image_height > JPEG_MAX_DIMENSION) {
++				throw FI_MSG_ERROR_DIB_MEMORY;
++			}
++
+ 			// step 4: set parameters for decompression
+ 
+ 			unsigned int scale_denom = 1;		// fraction by which to scale image

diff --git a/CVE-2023-47997.patch b/CVE-2023-47997.patch
new file mode 100644
index 0000000..7680ce3
--- /dev/null
+++ b/CVE-2023-47997.patch
@@ -0,0 +1,16 @@
+diff -rupN --no-dereference freeimage-svn-r1909-FreeImage-trunk/Source/FreeImage/PluginTIFF.cpp freeimage-svn-r1909-FreeImage-trunk-new/Source/FreeImage/PluginTIFF.cpp
+--- freeimage-svn-r1909-FreeImage-trunk/Source/FreeImage/PluginTIFF.cpp	2024-03-10 14:22:18.669574426 +0100
++++ freeimage-svn-r1909-FreeImage-trunk-new/Source/FreeImage/PluginTIFF.cpp	2024-03-10 14:22:18.673574403 +0100
+@@ -1484,6 +1484,12 @@ Load(FreeImageIO *io, fi_handle handle,
+ 				(int)bitspersample, (int)samplesperpixel, (int)photometric);
+ 			throw (char*)NULL;
+ 		}
++		if (planar_config == PLANARCONFIG_SEPARATE && bitspersample < 8) {
++			FreeImage_OutputMessageProc(s_format_id,
++				"Unable to handle this format: bitspersample = 8, TIFFTAG_PLANARCONFIG = PLANARCONFIG_SEPARATE"
++			);
++			throw (char*)NULL;
++		}
+ 
+ 		// ---------------------------------------------------------------------------------
+ 

diff --git a/freeimage.spec b/freeimage.spec
index 033448c..d50852d 100644
--- a/freeimage.spec
+++ b/freeimage.spec
@@ -6,7 +6,7 @@
 
 Name:           freeimage
 Version:        3.19.0
-Release:        0.22%{?svn_rev:.svn%svn_rev}%{?dist}
+Release:        0.23%{?svn_rev:.svn%svn_rev}%{?dist}
 Summary:        Multi-format image decoder library
 
 # freeimage is tripple-licensed, see
@@ -38,7 +38,10 @@ Patch7:         CVE-2020-24293.patch
 Patch8:         CVE-2020-24295.patch
 # Downstream fix for CVE-2021-40263
 Patch9:         CVE-2021-40263.patch
-
+# Downstream fix for CVE-2023-47997
+Patch10:        CVE-2023-47997.patch
+# Downstream fix for CVE-2023-47995
+Patch11:        CVE-2023-47995.patch
 
 
 BuildRequires:  doxygen
@@ -122,8 +125,8 @@ sh ./genfipsrclist.sh
 %make_build -f Makefile.gnu CFLAGS="%{optflags} -fPIC" CXXFLAGS="%{optflags} -fPIC" LDFLAGS="%{__global_ldflags}"
 %make_build -f Makefile.fip CFLAGS="%{optflags} -fPIC" CXXFLAGS="%{optflags} -fPIC" LDFLAGS="%{__global_ldflags}"
 %else
-%make_build -f Makefile.gnu CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}"
-%make_build -f Makefile.fip CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}"
+%make_build -f Makefile.gnu CFLAGS="-g -O0" CXXFLAGS="-g -O0" LDFLAGS="%{__global_ldflags}"
+%make_build -f Makefile.fip CFLAGS="-g -O0" CXXFLAGS="-g -O0" LDFLAGS="%{__global_ldflags}"
 %endif
 
 pushd Wrapper/FreeImagePlus/doc
@@ -143,6 +146,7 @@ install -Dpm 644 Wrapper/FreeImagePlus/FreeImagePlus.h %{buildroot}%{_includedir
 
 # install missing symlink (was giving no-ldconfig-symlink rpmlint errors)
 ldconfig -n %{buildroot}%{_libdir}
+fail
 
 
 %files
@@ -168,6 +172,9 @@ ldconfig -n %{buildroot}%{_libdir}
 
 
 %changelog
+* Sun Mar 10 2024 Sandro Mani <manisandro@gmail.com> - 3.19.0-0.23.svn1909
+- Add downstream patches for CVE-2023-47997, CVE-2023-47995
+
 * Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.19.0-0.22.svn1909
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
 

                 reply	other threads:[~2026-11-18  2:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=179496974285.1.3724789955182015692.rpms-freeimage-8beea291bdeb@fedoraproject.org \
    --to=manisandro@gmail.com \
    --cc=git-commits@fedoraproject.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