[packages/openjpeg2] Rel 2. Fix integer overflow in opj_pi_initialise_encode().
arekm
arekm at pld-linux.org
Thu Nov 26 08:29:26 CET 2026
commit 7f8d5e7162f56e035cd83421df2333aa7c808edd
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Nov 26 03:52:34 2026 +0100
Rel 2. Fix integer overflow in opj_pi_initialise_encode().
Fixes CVE-2026-6192.
openjpeg2-CVE-2026-6192.patch | 21 +++++++++++++++++++++
openjpeg2.spec | 5 ++++-
2 files changed, 25 insertions(+), 1 deletion(-)
---
diff --git a/openjpeg2.spec b/openjpeg2.spec
index 3031e46..ed7550c 100644
--- a/openjpeg2.spec
+++ b/openjpeg2.spec
@@ -6,12 +6,14 @@ Summary: An open-source JPEG 2000 codec
Summary(pl.UTF-8): Biblioteka kodująca i dekodująca format JPEG 2000
Name: openjpeg2
Version: 2.5.4
-Release: 1
+Release: 2
License: BSD
Group: Libraries
#Source0Download: https://github.com/uclouvain/openjpeg/releases/
Source0: https://github.com/uclouvain/openjpeg/archive/v%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 6160de075bb5191e482bc0f024b375e4
+# https://github.com/uclouvain/openjpeg/commit/839936aa33eb8899bbbd80fda02796bb65068951
+Patch0: %{name}-CVE-2026-6192.patch
URL: http://www.openjpeg.org/
BuildRequires: cmake >= 3.5
BuildRequires: doxygen
@@ -89,6 +91,7 @@ Programy kodujące/dekodujące dla biblioteki OpenJPEG 2.
%prep
%setup -q -n openjpeg-%{version}
+%patch -P0 -p1
%build
%cmake -B build \
diff --git a/openjpeg2-CVE-2026-6192.patch b/openjpeg2-CVE-2026-6192.patch
new file mode 100644
index 0000000..8a95c5a
--- /dev/null
+++ b/openjpeg2-CVE-2026-6192.patch
@@ -0,0 +1,21 @@
+# CVE-2026-6192: integer overflow in opj_pi_initialise_encode() include allocation
+diff --git a/src/lib/openjp2/pi.c b/src/lib/openjp2/pi.c
+index 15ac33142..4abb87af2 100644
+--- a/src/lib/openjp2/pi.c
++++ b/src/lib/openjp2/pi.c
+@@ -1694,9 +1694,12 @@ opj_pi_iterator_t *opj_pi_initialise_encode(const opj_image_t *p_image,
+ l_current_pi = l_pi;
+
+ /* memory allocation for include*/
+- l_current_pi->include_size = l_tcp->numlayers * l_step_l;
+- l_current_pi->include = (OPJ_INT16*) opj_calloc(l_current_pi->include_size,
+- sizeof(OPJ_INT16));
++ l_current_pi->include = NULL;
++ if (l_step_l <= UINT_MAX / l_tcp->numlayers) {
++ l_current_pi->include_size = l_tcp->numlayers * l_step_l;
++ l_current_pi->include = (OPJ_INT16*) opj_calloc(l_current_pi->include_size,
++ sizeof(OPJ_INT16));
++ }
+ if (!l_current_pi->include) {
+ opj_free(l_tmp_data);
+ opj_free(l_tmp_ptr);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/openjpeg2.git/commitdiff/7f8d5e7162f56e035cd83421df2333aa7c808edd
More information about the pld-cvs-commit
mailing list