From patchwork Tue Dec 1 04:45:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hitendra Prajapati X-Patchwork-Id: 106689 Received: from mail-dl1-f48.google.com (mail-dl1-f48.google.com [74.125.82.48]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.4621.1796100354420922568 for ; Mon, 30 Nov 2026 20:45:54 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=Tv6wzVT0; spf=pass (domain: mvista.com, ip: 74.125.82.48, mailfrom: hprajapati@mvista.com) Received: by mail-dl1-f48.google.com with SMTP id a92af1059eb24-170135e43c7so4018994c88.0 for ; Mon, 30 Nov 2026 20:45:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1796100354; x=1796705154; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=t871jIB0rzQjllsIjjN5vytCRtdAyVxQWfviNt5wJeo=; b=Tv6wzVT0ntrx3zMM+Hjlfh7TU/EqTkiBPGluRnqK2cSkC9+13iDH6k7nbHbB2K4SAg 9R7qBmY0cqw0pPie3suMAhHsOWdWzBz+DN9ib8LXqs8helqyDi2Zh/poy63gKvL0OxMg nVIimv24yHC8lUns9DAKL7y8OWwjOEveFb3O4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796100354; x=1796705154; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=t871jIB0rzQjllsIjjN5vytCRtdAyVxQWfviNt5wJeo=; b=pErcJEIjMLfvZyk6OXd8YYwaVCSXBK1rBJ5YDgZzmXEVJRgD5VN7U7+KCBj461L2fo IUiQieOYl/tuNcRrdYr/XxGBer8ndWF2vXbKFPrH9FBG91jomt0YlEsVxiMbPL+h4xBi ffsFyLyPDkPGRqNLfhEznojoIUELwNsbnnF9ECdPZQacAk4QS8oT0ehYQdLvPNjcR+fv oQVEtQJMi1YuOflQFJ7kQJQwZO3Pqf7LRQDIJocZrSA7MerOnEgovQYb/U/6eO0yJnW4 H6MfmTiVqdsqwxfQJEsHWvSj3+s01tQjJG36fhFqefQ4lmUZlaMU1ecA6+NmG337DNWU 0rNA== X-Gm-Message-State: APuU4Z/pPC5kTLRckIlemd2331frBlzv/4DZg+eaII+zi/MISLhr4GDL OLtXS9cWTcy1rvYrAmApATBABo6ZHG2KEXSCPYTzqf4Kd8SM7d1s3dQEFEc9XsbA0Z3/z0D0u4+ d+APyoCc= X-Gm-Gg: AZFdTZeKVMCPRFiJNwyGVUpopUMG/uf/EMILsvOqZW80wVkqhH4Wdv2bnJTucI3E9Sn b21MDj/6+4z/8reMEjiIvFITLVh2o3kYEiIRePQuaDmytoRJMQcVZl5o3pey1WibK59zpWRwA2A 4q6O7TId3k/sXxfjUmtjDsDhVI2BcD5L29+KZLC7q2vrgFayu3z+nx24zAcIbiZV8dbta5nmVrG hhy0OVf52kYXWb2Ju93ZdiZgXpl1QfjFxkd8ehRlTCqpyloc/4gkKqXLPPphdg2stZxQ6CpHuRj pW4LCy0RdZFrFcEltu5C7dh69ruo9k5sWoRk+3weetVu1p76G1uPPwwtXWugV7ZUPX/Z77JSb0c LoeY/nxjCQMqb6iAq5v6BTh8v8Q1oH/goC69OHXqZueITAqvZ1w+UokmOUlNxukElz7S9+aO8lW e+yXBEUL0ce2/WxpINeNTm5jufS/sU349bqaY60pv3h05ka+M3VX5Il3RV0ZsCrD56fm4XOYRXP s0u2ylKLwmJeNSki+g4tZS9csZAmZCwEyZFrFeXIANtelGzlKzj8BTeePEiGUt0rSPa4YpSm8BW xuVpqfyckKF4trx7rOaI01qonS2yqPf2i7fJdiHoVg== X-Received: by 2002:a05:701b:418c:20b0:1b5:39a3:75e5 with SMTP id a92af1059eb24-1b556901fccmr35668398c88.33.1796100353720; Mon, 30 Nov 2026 20:45:53 -0800 (PST) Return-Path: Received: from MVIN00013.mvista.com ([103.250.136.231]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b562a82b3fsm100907805c88.5.2026.11.30.20.45.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 20:45:53 -0800 (PST) From: Hitendra Prajapati To: openembedded-core@lists.openembedded.org Cc: Hitendra Prajapati Subject: [scarthgap][PATCH 1/2] libxfont: patch CVE-2026-59679 Date: Tue, 1 Dec 2026 10:15:45 +0530 Message-ID: <20261201044546.29774-1-hprajapati@mvista.com> X-Mailer: git-send-email 2.50.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 04:46:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251664 Pick the patch from [1], also referenced in the Debian report [2]. [1] https://gitlab.freedesktop.org/xorg/lib/libxfont/-/commit/668fea81f40bcb48ec67fb55d0b851049d265290 [2] https://security-tracker.debian.org/tracker/CVE-2026-59679 Signed-off-by: Hitendra Prajapati --- .../xorg-lib/libxfont/CVE-2026-59679.patch | 95 +++++++++++++++++++ .../xorg-lib/libxfont_1.5.4.bb | 1 + 2 files changed, 96 insertions(+) create mode 100644 meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-59679.patch diff --git a/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-59679.patch b/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-59679.patch new file mode 100644 index 0000000000..cee250ab6b --- /dev/null +++ b/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-59679.patch @@ -0,0 +1,95 @@ +From 016a21b1eea8e4aef4949e19cdf5f386f36fd978 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 13 Jul 2026 15:48:06 +1000 +Subject: [PATCH] fserve: validate num_chars against encoding array size in + fs_read_glyphs + +FS_QueryXExtents16 causes us to allocate the encoding[] array, later +during the FS_QueryXBitmaps16 reply handling we fill in that array. +There is no verification that the allocation is large enough, a +malicious font server could send us a small numExtents and a +large num_chars to force underallocation and OOB read/rwrite. + +A regression test is included that constructs a crafted +FS_QueryXBitmaps16 reply with num_chars > num_encoding and verifies +the library rejects it. + +CVE-2026-59679 + +Found-by: Zhixi "Jace" Sun, independent security researcher +Assisted-by: Claude:claude-opus-4-6 +Signed-off-by: Peter Hutterer +Part-of: + +Dropped makefile and test changes during backport. + +CVE: CVE-2026-59679 +Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/lib/libxfont/-/commit/668fea81f40bcb48ec67fb55d0b851049d265290] +Signed-off-by: Hitendra Prajapati +--- + src/fc/fserve.c | 22 ++++++++++++++++++++++ + src/fc/fservestr.h | 1 + + 2 files changed, 23 insertions(+) + +diff --git a/src/fc/fserve.c b/src/fc/fserve.c +index c676234..027f71d 100644 +--- a/src/fc/fserve.c ++++ b/src/fc/fserve.c +@@ -1097,6 +1097,7 @@ fs_read_extent_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec) + return AllocError; + } + fsfont->encoding = pCI; ++ fsfont->num_encoding = numExtents; + if (haveInk) + fsfont->inkMetrics = pCI + numExtents; + else +@@ -2003,6 +2004,17 @@ fs_read_glyphs(FontPathElementPtr fpe, FSBlockDataPtr blockrec) + { + minchar = 0; + maxchar = rep->num_chars; ++ ++ /* Reject replies where num_chars exceeds the encoding array ++ size allocated in fs_read_extent_info() to prevent ++ out-of-bounds access on encoding[]. */ ++ if (rep->num_chars > (CARD32)fsdata->num_encoding) ++ { ++ ErrorF("fserve: num_chars (%u) > num_encoding (%d)\n", ++ (unsigned) rep->num_chars, fsdata->num_encoding); ++ err = AllocError; ++ goto bail; ++ } + } + + off_adr = (char *)ppbits; +@@ -2024,6 +2036,16 @@ fs_read_glyphs(FontPathElementPtr fpe, FSBlockDataPtr blockrec) + for (i = 0; i < rep->num_chars; i++) + { + memcpy(&local_off, off_adr, SIZEOF(fsOffset32)); /* align it */ ++ /* Bounds-check minchar against the encoding array size to ++ prevent out-of-bounds access from a malicious font server ++ reply with more num_chars than num_extents. */ ++ if (minchar >= (unsigned long)fsdata->num_encoding) ++ { ++ ErrorF("fserve: glyph index %lu >= num_encoding (%d)\n", ++ minchar, fsdata->num_encoding); ++ err = AllocError; ++ goto bail; ++ } + if (blockrec->type == FS_OPEN_FONT || + fsdata->encoding[minchar].bits == &_fs_glyph_requested) + { +diff --git a/src/fc/fservestr.h b/src/fc/fservestr.h +index 29ae46e..da95e41 100644 +--- a/src/fc/fservestr.h ++++ b/src/fc/fservestr.h +@@ -43,6 +43,7 @@ typedef struct _fs_glyph { + typedef struct _fs_font { + CharInfoPtr pDefault; + CharInfoPtr encoding; ++ int num_encoding; + CharInfoPtr inkMetrics; + FSGlyphPtr glyphs; + } FSFontRec, *FSFontPtr; +-- +2.50.1 + diff --git a/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb b/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb index 5f1af82ac4..01f0521345 100644 --- a/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb +++ b/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb @@ -22,6 +22,7 @@ BBCLASSEXTEND = "native" SRC_URI += "file://CVE-2026-56001.patch \ file://CVE-2026-56002.patch \ file://CVE-2026-56003.patch \ + file://CVE-2026-59679.patch \ " SRC_URI[md5sum] = "16eaf156edd79b68038b6a7c44aa9e9b" From patchwork Tue Dec 1 04:45:46 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hitendra Prajapati X-Patchwork-Id: 106690 Received: from mail-dl1-f54.google.com (mail-dl1-f54.google.com [74.125.82.54]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.4604.1796100356601851260 for ; Mon, 30 Nov 2026 20:45:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=Zopua9Hc; spf=pass (domain: mvista.com, ip: 74.125.82.54, mailfrom: hprajapati@mvista.com) Received: by mail-dl1-f54.google.com with SMTP id a92af1059eb24-1a3c08d6928so17254745c88.0 for ; Mon, 30 Nov 2026 20:45:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1796100356; x=1796705156; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=qCIlaxnOFL9DloX1dytq8kIrCy1ClmZfMDmQA95ANd4=; b=Zopua9Hcftl5vTkLqyu9ToqxvvaVLqySlBSnBVzGcfVZDolO447xUsWxAXdUlQ+O1X ZK7lU/VC8xrHTjy+S/s57BMY/uYNYKtwtwlRLvmB/KpYR6sQi/cb7QoXmQVYw+3nGhGA Sg7sVM+ezxJu07Epba+8dicAONTTyX4GajH+Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796100356; x=1796705156; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=qCIlaxnOFL9DloX1dytq8kIrCy1ClmZfMDmQA95ANd4=; b=Wujc/zupcPwe8mTQjmdlVaBrXdh1Ht4ZyHrstweGIPKn8XsClHOrwXFSXMPZM3dqvH GmJ0c1ftyA32I8FjQE8Fhz15RlwBzfUA9X7YvKDTNcGyVWSE/hSrCUzxREXVZOGki/b9 v0HmG8BTrzCQJhPN8man53GszJt0QiZSMkBIzP5X+W1qA/PCRKmjaURM0y8Wr708MugQ ZZnMCueMYZSAqXEXSEn3xNyzPO+bBtx/rBZSVBabPEH9BiZZgHJHGHsyqIDvvuvpILzV ri9D1UdAqEdxndPvWo37E9ZUPd8mvEUYZkMdr1mYoHXIDcNA2UrajL+X5VwVYBQa6OZZ oV5w== X-Gm-Message-State: APuU4Z+HAVvF59wH1SxKEQpiTgeI3QtrKZRAbhGuN+NHL324su1QTnMP 2UgztnfKEMiVJS8fRwaShLnTrAuNzuz49VdstvflVRsajpxm3yTFWAosJBDc7iG8SLdA6PQELHU 8xQX2ejc= X-Gm-Gg: AZFdTZepiMemWR5zBIyc4gESOflhctrz+x0A2wT286YYlx7gZhIHwdRLE7wByKLoAeP yNMr+K0FZKAxeiu/Em8IHWrAGz1YGMrMn2p1X9V6RJyDe5hYi1c8/fV+95lQMsrI80o8tVRWUjf aJi0aaraP9tZ31vcIX1pFimIjJjEXSkJABkdbXZGwhOjxKGwPcOuXZfqjmL5Va+fUSiOtEDF4o5 aTjNYd0G8t0NDtkKjECBGl+vSy3NZCYzspHoZlkHfwv21OLqCrW792SMf/EpfkPltDDIiLEkLfQ Zqu+z0jEAV8piFi7kJyZoxM/kjFen8htS9pTzk5hgjthdind7rGgvFhmIenauzw9sUVwKgEBUJJ MvqR5xqrVWMTPORArRFPjI+1nEvWLNZ4N9QDmKvXwCnlArbIDozXsNzw0CrR+c7So+qoDaQk/Ym diNHwrR81x740oVRsQsJhXG5eSzhQtp4aWtotbCDItJsDExljJQp7Epn3NEJDpqgIZtNB/I9pZy V0QiChIlniQT9TI2w+7s+TpqbdLKhPDoIdElVLnqImGfC2SpNMV73w1HFYXJOA2A4BqHfSnYULS ORw9njbJxJlPPOgWt1Ii+4HBf0WiHLW+akIcmRtcBQ== X-Received: by 2002:a05:701a:815a:20b0:1b2:4e29:92f4 with SMTP id a92af1059eb24-1b5568eaf10mr30836961c88.39.1796100355950; Mon, 30 Nov 2026 20:45:55 -0800 (PST) Return-Path: Received: from MVIN00013.mvista.com ([103.250.136.231]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b562a82b3fsm100907805c88.5.2026.11.30.20.45.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 20:45:55 -0800 (PST) From: Hitendra Prajapati To: openembedded-core@lists.openembedded.org Cc: Hitendra Prajapati Subject: [scarthgap][PATCH 2/2] libxfont: fix for CVE-2026-44950 Date: Tue, 1 Dec 2026 10:15:46 +0530 Message-ID: <20261201044546.29774-2-hprajapati@mvista.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20261201044546.29774-1-hprajapati@mvista.com> References: <20261201044546.29774-1-hprajapati@mvista.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 04:46:11 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251665 Pick the patch from [1], also referenced in the Debian report [2]. [1] https://gitlab.freedesktop.org/xorg/lib/libxfont/-/commit/c2d222bb22c623d8a40f3275077fc7e6617f2c8 [2] https://security-tracker.debian.org/tracker/CVE-2026-44950 Signed-off-by: Hitendra Prajapati --- .../xorg-lib/libxfont/CVE-2026-44950.patch | 101 ++++++++++++++++++ .../xorg-lib/libxfont_1.5.4.bb | 1 + 2 files changed, 102 insertions(+) create mode 100644 meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-44950.patch diff --git a/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-44950.patch b/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-44950.patch new file mode 100644 index 0000000000..fa30c0d961 --- /dev/null +++ b/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-44950.patch @@ -0,0 +1,101 @@ +From b48aa50f2ba02f74167492c1c3aa312a7590991a Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 13 Jul 2026 15:50:09 +1000 +Subject: [PATCH] fserve: bounds-check cumulative glyph data writes in + fs_read_glyphs + +fs_read_glyphs() copies each glyph's bitmap into a single allbits +buffer allocated to rep->nbytes bytes. The per-glyph guard validates +only that the source slice (position, length) lies within the pbitmaps +source buffer. It does not check whether the running destination cursor +has exceeded the allocation. + +A malicious font server can send overlapping source offsets (e.g. 1000 +glyphs each referencing {position:0, length:64} with nbytes=64). Each +individual source range passes validation, but the cumulative writes +total 64000 bytes into a 64-byte destination buffer. + +Interestingly there was an unconditional debug printf in place that +sort-of warned about this but didn't prevent this. Let's remove that and +instead use the actual check to bail out before we run OOB. + +A regression test is included that sends 100 glyphs each referencing +the same 64-byte source slice into a 64-byte destination buffer, and +verifies the library rejects the overflow. + +CVE-2026-44950 + +Found-by: Zhixi "Jace" Sun, independent security researcher +Assisted-by: Claude:claude-opus-4-6 +Signed-off-by: Peter Hutterer +Part-of: +(cherry picked from commit c2d222bb22c623d8a40f3275077fc7e6617f2c8a) + +Dropped test changes during the backport. + +CVE: CVE-2026-44950 +Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/lib/libxfont/-/commit/c2d222bb22c623d8a40f3275077fc7e6617f2c8a] +Signed-off-by: Hitendra Prajapati +--- + src/fc/fserve.c | 23 ++++++++++++++--------- + 1 file changed, 14 insertions(+), 9 deletions(-) + +diff --git a/src/fc/fserve.c b/src/fc/fserve.c +index 027f71d..0ed79c1 100644 +--- a/src/fc/fserve.c ++++ b/src/fc/fserve.c +@@ -1923,10 +1923,7 @@ fs_read_glyphs(FontPathElementPtr fpe, FSBlockDataPtr blockrec) + fsOffset32 local_off; + char *off_adr; + pointer pbitmaps; +- char *bits, *allbits; +-#ifdef DEBUG +- char *origallbits; +-#endif ++ char *bits, *allbits, *origallbits; + int i, + err; + int nranges = 0; +@@ -2027,8 +2024,8 @@ fs_read_glyphs(FontPathElementPtr fpe, FSBlockDataPtr blockrec) + goto bail; + } + +-#ifdef DEBUG + origallbits = allbits; ++#ifdef DEBUG + fprintf (stderr, "Reading %d glyphs in %d bytes for %s\n", + (int) rep->num_chars, (int) rep->nbytes, fsd->name); + #endif +@@ -2059,6 +2056,18 @@ fs_read_glyphs(FontPathElementPtr fpe, FSBlockDataPtr blockrec) + (local_off.position < rep->nbytes) && + (local_off.length <= (rep->nbytes - local_off.position))) + { ++ /* Check that the destination buffer has enough room ++ for this glyph to prevent a heap overflow from ++ overlapping source offsets. */ ++ if (local_off.length > ++ rep->nbytes - (allbits - origallbits)) ++ { ++ ErrorF("fserve: glyph data overflow: " ++ "cumulative write exceeds nbytes (%u)\n", ++ (unsigned) rep->nbytes); ++ err = AllocError; ++ goto bail; ++ } + bits = allbits; + allbits += local_off.length; + memcpy(bits, (char *)pbitmaps + local_off.position, +@@ -2086,10 +2095,6 @@ fs_read_glyphs(FontPathElementPtr fpe, FSBlockDataPtr blockrec) + } + off_adr += SIZEOF(fsOffset32); + } +-#ifdef DEBUG +- fprintf (stderr, "Used %d bytes instead of %d\n", +- (int) (allbits - origallbits), (int) rep->nbytes); +-#endif + + if (blockrec->type == FS_OPEN_FONT) + { +-- +2.50.1 + diff --git a/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb b/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb index 01f0521345..874cd5b14c 100644 --- a/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb +++ b/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb @@ -23,6 +23,7 @@ SRC_URI += "file://CVE-2026-56001.patch \ file://CVE-2026-56002.patch \ file://CVE-2026-56003.patch \ file://CVE-2026-59679.patch \ + file://CVE-2026-44950.patch \ " SRC_URI[md5sum] = "16eaf156edd79b68038b6a7c44aa9e9b"