Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gegl for openSUSE:Factory checked in 
at 2026-11-21 21:45:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gegl (Old)
 and      /work/SRC/openSUSE:Factory/.gegl.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gegl"

Sat Nov 21 21:45:06 2026 rev:95 rq:1398711 version:0.4.72

Changes:
--------
--- /work/SRC/openSUSE:Factory/gegl/gegl.changes        2026-09-08 
16:51:33.766538455 +0200
+++ /work/SRC/openSUSE:Factory/.gegl.new.1340718/gegl.changes   2026-11-21 
21:45:37.905170007 +0100
@@ -1,0 +2,7 @@
+Thu Nov 19 02:30:10 UTC 2026 - Jonathan Kang <[email protected]>
+
+- CVE-2026-103641: libs/rgbe: fix #477 Segfault in
+  rgbe_rgbe_to_float() (bsc#1283808)
+  * gegl-CVE-2026-103641.patch
+
+-------------------------------------------------------------------

New:
----
  gegl-CVE-2026-103641.patch

----------(New B)----------
  New:  rgbe_rgbe_to_float() (bsc#1283808)
  * gegl-CVE-2026-103641.patch
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gegl.spec ++++++
--- /var/tmp/diff_new_pack.xBdE1H/_old  2026-11-21 21:45:38.666202046 +0100
+++ /var/tmp/diff_new_pack.xBdE1H/_new  2026-11-21 21:45:38.668202131 +0100
@@ -35,6 +35,8 @@
 Source0:        
https://download.gimp.org/pub/gegl/0.4/%{name}-%{version}.tar.xz
 Source1:        normalize-gir.pl
 Source99:       baselibs.conf
+# PATCH-FIX-UPSTREAM gegl-CVE-2026-103641.patch bsc#1283808 [email protected] -- 
libs/rgbe: fix #477 Segfault in rgbe_rgbe_to_float()
+Patch0:         gegl-CVE-2026-103641.patch
 
 BuildRequires:  ImageMagick
 BuildRequires:  asciidoc

++++++ gegl-CVE-2026-103641.patch ++++++
>From 75214d1e6893d5a6b418a62ae6953a121c371a32 Mon Sep 17 00:00:00 2001
From: Jacob Boerema <[email protected]>
Date: Wed, 30 Sep 2026 10:42:59 -0400
Subject: [PATCH] libs/rgbe: fix #477 Segfault in rgbe_rgbe_to_float()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

A short .hdr that claims width 8 and height 11207 makes the
uncompressed decoder read width × 4 bytes per row from the
GMappedFile without checking how many bytes remain.
ASan reports a READ SEGV.

We use rgbe_mapped_file_remaining to make sure we are not going to
read beyond the end of the mapped file. Also do this in a few other
places that were also missing a safety check.

In addition to that, if at least one scanline has been read, return
the partially loaded image instead of NULL.
---
 libs/rgbe/rgbe.c | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/libs/rgbe/rgbe.c b/libs/rgbe/rgbe.c
index c0ee66178..996afd699 100644
--- a/libs/rgbe/rgbe.c
+++ b/libs/rgbe/rgbe.c
@@ -134,7 +134,7 @@ rgbe_mapped_file_remaining (GMappedFile *f,
                             const void  *data)
 {
   g_return_val_if_fail (f, 0);
-  g_return_val_if_fail (GPOINTER_TO_UINT (data) >
+  g_return_val_if_fail (GPOINTER_TO_UINT (data) >=
                         GPOINTER_TO_UINT (g_mapped_file_get_contents (f)), 0);
 
   return GPOINTER_TO_UINT (data) -
@@ -595,6 +595,9 @@ rgbe_read_uncompressed (const rgbe_file *file,
 
   data = (guint8 *)g_mapped_file_get_contents (file->file) + *cursor;
 
+  if (rgbe_mapped_file_remaining (file->file, data) < (gsize) 
file->header.x_axis.size * RGBE_NUM_RGBE)
+    return FALSE;
+
   for (i = 0; i < file->header.x_axis.size; ++i)
     {
       rgbe_rgbe_to_float (file, data, pixels);
@@ -665,6 +668,8 @@ rgbe_read_new_rle (const rgbe_file *file,
                  RGBE_NUM_RGBE * linesize, max_size);
       return FALSE;
     }
+  else if (rgbe_mapped_file_remaining (file->file, data) < (gsize) 
RGBE_NUM_RGBE * linesize)
+    return FALSE;
 
   data += RGBE_NUM_RGBE;
 
@@ -1032,7 +1037,7 @@ rgbe_get_size (rgbe_file *file,
 gfloat *
 rgbe_read_scanlines (rgbe_file *file)
 {
-  guint     i;
+  guint     rows    = 0;
   gboolean  success = FALSE;
   gfloat   *pixels  = NULL,
            *pixel_cursor;
@@ -1051,10 +1056,18 @@ rgbe_read_scanlines (rgbe_file *file)
   offset = GPOINTER_TO_UINT (file->scanlines) -
            GPOINTER_TO_UINT (g_mapped_file_get_contents (file->file));
 
-  for (i = 0; i < file->header.y_axis.size; ++i)
+  for (guint i = 0; i < file->header.y_axis.size; ++i)
     {
       const gchar *data = g_mapped_file_get_contents (file->file);
 
+      if (rgbe_mapped_file_remaining (file->file, data) < offset + OFFSET_B)
+        {
+          success = FALSE;
+          g_warning ("Unable to parse rgbe scanlines, fail at row %u\n", i);
+          goto cleanup;
+        }
+      
+
       if (data[offset + OFFSET_R] == 1 &&
           data[offset + OFFSET_G] == 1 &&
           data[offset + OFFSET_B] == 1)
@@ -1070,13 +1083,14 @@ rgbe_read_scanlines (rgbe_file *file)
           g_warning ("Unable to parse rgbe scanlines, fail at row %u\n", i);
           goto cleanup;
         }
+      rows++;
       pixel_cursor += file->header.x_axis.size * RGBE_NUM_RGBE;
     }
 
   success = TRUE;
 
 cleanup:
-  if (!success)
+  if (!success && rows == 0)
     {
       g_free (pixels);
       pixels = NULL;
-- 
2.55.0

Reply via email to