public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/freeimage] epel10.3: Add downstream patches for CVE-2023-47997, CVE-2023-47995
@ 2026-11-18  2:42 Sandro Mani
  0 siblings, 0 replies; only message in thread
From: Sandro Mani @ 2026-11-18  2:42 UTC (permalink / raw)
  To: git-commits

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
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-18  2:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18  2:42 [rpms/freeimage] epel10.3: Add downstream patches for CVE-2023-47997, CVE-2023-47995 Sandro Mani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox