Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libXfont2 for openSUSE:Factory 
checked in at 2026-11-19 16:53:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libXfont2 (Old)
 and      /work/SRC/openSUSE:Factory/.libXfont2.new.1251 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libXfont2"

Thu Nov 19 16:53:39 2026 rev:11 rq:1398279 version:2.0.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/libXfont2/libXfont2.changes      2026-08-06 
16:19:04.637904563 +0200
+++ /work/SRC/openSUSE:Factory/.libXfont2.new.1251/libXfont2.changes    
2026-11-19 16:53:49.732511979 +0100
@@ -1,0 +2,14 @@
+Tue Nov 17 10:32:39 UTC 2026 - Stefan Dirsch <[email protected]>
+
+- bsc1289838_CVE-2026-109920_FreeType-always-initialise-strike_index.patch
+  * FreeType backend uninitialised strike_index out-of-bounds read
+    (CVE-2026-109920, bsc#1289838)
+
+-------------------------------------------------------------------
+Thu Nov  5 13:21:15 UTC 2026 - Stefan Dirsch <[email protected]>
+
+- 
bsc1289304_CVE-2026-109909_bufio-pcf-reject-negative-skip-count-in-BufFileRawSk.patch
+  * PCF Font Parsing Negative Skip Out-Of-Bounds Read (CVE-2026-109909,
+    bsc#1289304)
+
+-------------------------------------------------------------------

New:
----
  
bsc1289304_CVE-2026-109909_bufio-pcf-reject-negative-skip-count-in-BufFileRawSk.patch
  bsc1289838_CVE-2026-109920_FreeType-always-initialise-strike_index.patch

----------(New B)----------
  New:
- 
bsc1289304_CVE-2026-109909_bufio-pcf-reject-negative-skip-count-in-BufFileRawSk.patch
  * PCF Font Parsing Negative Skip Out-Of-Bounds Read (CVE-2026-109909,
  New:
- bsc1289838_CVE-2026-109920_FreeType-always-initialise-strike_index.patch
  * FreeType backend uninitialised strike_index out-of-bounds read
----------(New E)----------

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

Other differences:
------------------
++++++ libXfont2.spec ++++++
--- /var/tmp/diff_new_pack.MLbqA2/_old  2026-11-19 16:53:50.692552673 +0100
+++ /var/tmp/diff_new_pack.MLbqA2/_new  2026-11-19 16:53:50.693552716 +0100
@@ -34,6 +34,8 @@
 Patch1269020:   
bsc1269020_CVE-2026-56003_0003-bitscale-add-bounds-check-to-computeProps-for-proper.patch
 Patch1272660:   
bsc1272660_CVE-2026-59679_0001-fserve-validate-num_chars-against-encoding-array-siz.patch
 Patch1272661:   
bsc1272661_CVE-2026-44950-0002-fserve-bounds-check-cumulative-glyph-data-writes-in-.patch
+Patch1289304:   
bsc1289304_CVE-2026-109909_bufio-pcf-reject-negative-skip-count-in-BufFileRawSk.patch
+Patch1289838:   
bsc1289838_CVE-2026-109920_FreeType-always-initialise-strike_index.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 #git#BuildRequires:    autoconf >= 2.60, automake, libtool
 BuildRequires:  pkgconfig

++++++ 
bsc1289304_CVE-2026-109909_bufio-pcf-reject-negative-skip-count-in-BufFileRawSk.patch
 ++++++
>From f9f25c0c5d1f60ebcdcf9f83fa57bf0ec6cc9a20 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <[email protected]>
Date: Tue, 3 Nov 2026 15:53:12 +1000
Subject: [PATCH libXfont] bufio,pcf: reject negative skip count in
 BufFileRawSkip
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

BufFileRawSkip() takes a signed int count but never validates it for
negative values. A crafted PCF font file can have a table offset that,
when subtracted from the current file position, wraps to a negative
value. This negative count passes the buffer bounds check
(curoff + count <= fileoff is trivially true for negative count) and
moves the buffer pointer backward past the buffer start. Subsequent
FontFileGetc() calls then read from invalid memory, causing an
out-of-bounds heap read or a segmentation fault.

Add validation in BufFileRawSkip() to reject negative count values,
returning BUFFILEEOF. Additionally, add defense-in-depth checks in
pcfSeekToType() to validate that the skip distance fits in an int and
that the position is non-negative before calling FontFileSkip.

This vulnerability was discovered by:
  Elias Myllymäki working with TrendAI Zero Day Initiative

CVE-2026-109909, ZDI-CAN-33183

Assisted-by: AI
---
 src/bitmap/pcfread.c | 4 +++-
 src/fontfile/bufio.c | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git ./src/bitmap/pcfread.c ../src/bitmap/pcfread.c
index a385331e1d48..e3b6277e1ed5 100644
--- ./src/bitmap/pcfread.c
+++ ../src/bitmap/pcfread.c
@@ -203,17 +203,19 @@ pcfGetCompressedMetric(FontFilePtr file, CARD32 format, 
xCharInfo *metric)
 static Bool
 pcfSeekToType(FontFilePtr file, PCFTablePtr tables, int ntables,
              CARD32 type, CARD32 *formatp, CARD32 *sizep)
 {
     int         i;
 
     for (i = 0; i < ntables; i++)
        if (tables[i].type == type) {
-           if (position > tables[i].offset)
+           if (position < 0 || (CARD32)position > tables[i].offset)
+               return FALSE;
+           if (tables[i].offset - (CARD32)position > INT_MAX)
                return FALSE;
            if (!FontFileSkip(file, tables[i].offset - position))
                return FALSE;
            position = tables[i].offset;
            *sizep = tables[i].size;
            *formatp = tables[i].format;
            return TRUE;
        }
diff --git ./src/fontfile/bufio.c ../src/fontfile/bufio.c
index 7465f72cbfe3..8b081e9bf595 100644
--- ./src/fontfile/bufio.c
+++ ../src/fontfile/bufio.c
@@ -82,16 +82,19 @@ BufFileRawFill (BufFilePtr f)
 
 static int
 BufFileRawSkip (BufFilePtr f, int count)
 {
     off_t      curoff;
     off_t      fileoff;
     off_t      todo;
 
+    if (count < 0)
+       return BUFFILEEOF;
+
     curoff = f->bufp - f->buffer;
     fileoff = curoff + f->left;
     if (curoff + count <= fileoff) {
        f->bufp += count;
        f->left -= count;
     } else {
        todo = count - (fileoff - curoff);
        if (lseek (FileDes(f), todo, SEEK_CUR) == -1) {
-- 
2.55.0


++++++ bsc1289838_CVE-2026-109920_FreeType-always-initialise-strike_index.patch 
++++++
>From 0ccab39c617c328b4b126a033656e9a9ece44772 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <[email protected]>
Date: Mon, 9 Nov 2026 14:37:01 +1000
Subject: [PATCH libXfont 2/2] FreeType: always initialise strike_index

When FreeTypeOpenInstance() allocates FTInstanceRec, the
instance->strike_index field is the only one left unset by default.

By renaming a BDF file to a FreeType-backed .pfb file we can trick
libXfont2 to use the FreeType backend, not its own bitmap backend,
resulting in a "non-SFNT face". This leaves the strike_index field
unset.

Later when we call FT_Do_SBit_Metrics() strike_index is used directly as
an array subscript, leaving us with potential OOB reads:

    FT_Bitmap_Size*  sz = &ft_face->available_sizes[strike_index];

This vulnerability was discovered by:
  Apex Security Research ([email protected])

CVE-2026-109920

Assisted-by: Claude:claude-opus-4-6
---
 Makefile.am                               |  12 ++
 src/FreeType/ftfuncs.c                    |   6 +-
 test/data/ft-strike-index/fonts.dir       |   2 +
 test/data/ft-strike-index/strike-test.bdf |  52 ++++++++
 test/data/ft-strike-index/strike-test.pfb |  52 ++++++++
 test/test-freetype-strike-index.c         | 154 ++++++++++++++++++++++
 6 files changed, 275 insertions(+), 3 deletions(-)
 create mode 100644 test/data/ft-strike-index/fonts.dir
 create mode 100644 test/data/ft-strike-index/strike-test.bdf
 create mode 100644 test/data/ft-strike-index/strike-test.pfb
 create mode 100644 test/test-freetype-strike-index.c

diff --git ./src/FreeType/ftfuncs.c ../src/FreeType/ftfuncs.c
index 0d529a8cee5b..d6117b341c11 100644
--- ./src/FreeType/ftfuncs.c
+++ ../src/FreeType/ftfuncs.c
@@ -418,16 +418,17 @@ FreeTypeOpenInstance(FTInstancePtr *instance_return, 
FTFacePtr face,
     if(instance == NULL) {
         return AllocError;
     }
 
     instance->refcount = 1;
     instance->face = face;
 
     instance->load_flags = load_flags;
+    instance->strike_index = 0xFFFFU;
     instance->spacing    = spacing;            /* Actual spacing */
     instance->pixel_size =0;
     instance->pixel_width_unit_x =0;
     instance->pixel_width_unit_y =0;
     instance->charcellMetrics = NULL;
     instance->averageWidth = 0;
     instance->rawAverageWidth = 0;
     instance->forceConstantMetrics = NULL;
@@ -473,18 +474,16 @@ FreeTypeOpenInstance(FTInstancePtr *instance_return, 
FTFacePtr face,
         return FTtoXReturnCode(ftrc);
     }
 
     if( FT_IS_SFNT( face->face ) ) {
 #if 1
         FT_F26Dot6  tt_char_width, tt_char_height, tt_dim_x, tt_dim_y;
         FT_Int     nn;
 
-        instance->strike_index=0xFFFFU;
-
         tt_char_width  = (FT_F26Dot6)(trans->scale*(1<<6) + 0.5);
         tt_char_height = (FT_F26Dot6)(trans->scale*(1<<6) + 0.5);
 
         tt_dim_x = FLOOR64( ( tt_char_width  * trans->xres + 36 ) / 72 + 32 );
         tt_dim_y = FLOOR64( ( tt_char_height * trans->yres + 36 ) / 72 + 32 );
 
        if ( tt_dim_x && !tt_dim_y )
            tt_dim_y = tt_dim_x;
@@ -969,17 +968,18 @@ ft_get_very_lazy_bbox( FT_UInt index,
 }
 
 static FT_Error
 FT_Do_SBit_Metrics( FT_Face ft_face, FT_Size ft_size, FT_ULong strike_index,
                    FT_UShort glyph_index, FT_Glyph_Metrics *metrics_return,
                    int *sbitchk_incomplete_but_exist )
 {
 #if 1
-    if ( strike_index != 0xFFFFU && ft_face->available_sizes != NULL )
+    if ( strike_index != 0xFFFFU && ft_face->available_sizes != NULL &&
+         strike_index < (FT_ULong) ft_face->num_fixed_sizes )
     {
       FT_Error         error;
       FT_Bitmap_Size*  sz = &ft_face->available_sizes[strike_index];
 
       error = FT_Set_Pixel_Sizes( ft_face, sz->x_ppem/64, sz->y_ppem/64 );
       if ( !error )
       {
         error = FT_Load_Glyph( ft_face, glyph_index, FT_LOAD_SBITS_ONLY );
-- 
2.56.0

Reply via email to