From patchwork Mon Nov 30 13:00:54 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hitendra Prajapati X-Patchwork-Id: 106487 Received: from mail-dl1-f49.google.com (mail-dl1-f49.google.com [74.125.82.49]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.31666.1796043670547818845 for ; Mon, 30 Nov 2026 05:01:10 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=TMaZbjvB; spf=pass (domain: mvista.com, ip: 74.125.82.49, mailfrom: hprajapati@mvista.com) Received: by mail-dl1-f49.google.com with SMTP id a92af1059eb24-1b59dfe466bso3109091c88.1 for ; Mon, 30 Nov 2026 05:01:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1796043670; x=1796648470; 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=k0eULE93XrIzTMAY3C27ArpPEWiICXinac5RFGNF5eU=; b=TMaZbjvB0TCXJCy7INShxqZXeTJa2xEKy040NrMhqntK2RDJeFqPMEZTydyZVpbDkA iBGvZzYypGK+RnxVohIQ8hjouLuNFgSjRD+WUiKFl6RYwh0AoDXsvT5b9I5c9X+KRX3w YXWddmUgj3SCq8DL3lx2Zhl1Sb3TTm608Qf0k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796043670; x=1796648470; 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=k0eULE93XrIzTMAY3C27ArpPEWiICXinac5RFGNF5eU=; b=f2kTvjtiYwXRVBltXM08AxCpDKcUhisNPGUxY8WF5W6ZSDFEgae+tYCdupcxhw3Tl6 f2b2AsAvgMtcJH8PsjpPvju3rr4sWYI70MA8rcac9xBcA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a2:2d7e with SMTP id a92af1059eb24-1b5567dab3cmr26655707c88.1.1796043669465; Mon, 30 Nov 2026 05:01:09 -0800 (PST) Return-Path: Received: from MVIN00013.mvista.com ([103.250.136.231]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b556840494sm78109074c88.12.2026.11.30.05.01.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 05:01:08 -0800 (PST) From: Hitendra Prajapati To: openembedded-core@lists.openembedded.org Cc: Hitendra Prajapati Subject: [scarthgap][PATCH 1/2] libxfont2: patch CVE-2026-59679 Date: Mon, 30 Nov 2026 18:30:54 +0530 Message-ID: <20261130130055.141094-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 ; Mon, 30 Nov 2026 13:01:17 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251596 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/libxfont2/CVE-2026-59679.patch | 95 +++++++++++++++++++ .../xorg-lib/libxfont2_2.0.6.bb | 1 + 2 files changed, 96 insertions(+) create mode 100644 meta/recipes-graphics/xorg-lib/libxfont2/CVE-2026-59679.patch diff --git a/meta/recipes-graphics/xorg-lib/libxfont2/CVE-2026-59679.patch b/meta/recipes-graphics/xorg-lib/libxfont2/CVE-2026-59679.patch new file mode 100644 index 0000000000..cee250ab6b --- /dev/null +++ b/meta/recipes-graphics/xorg-lib/libxfont2/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/libxfont2_2.0.6.bb b/meta/recipes-graphics/xorg-lib/libxfont2_2.0.6.bb index e0a951c3a4..67e8c99df4 100644 --- a/meta/recipes-graphics/xorg-lib/libxfont2_2.0.6.bb +++ b/meta/recipes-graphics/xorg-lib/libxfont2_2.0.6.bb @@ -18,6 +18,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[sha256sum] = "74ca20017eb0fb3f56d8d5e60685f560fc85e5ff3d84c61c4cb891e40c27aef4" From patchwork Mon Nov 30 13:00:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hitendra Prajapati X-Patchwork-Id: 106488 Received: from mail-dl1-f48.google.com (mail-dl1-f48.google.com [74.125.82.48]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.31891.1796043677377917770 for ; Mon, 30 Nov 2026 05:01:17 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=Ff7aaxqY; 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-15ea896ddc8so17077653c88.0 for ; Mon, 30 Nov 2026 05:01:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1796043677; x=1796648477; 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=d/aC7LmsoB6dJS7q6XJILLQp4Qn1jQWGyJjHAEWRfJE=; b=Ff7aaxqYawbZwdukrPB/COcs6ADzHoPi4Pr0nedLXLTDBgfN2ZMKWo1PeN+UrRA0cX Kn5brz/clXU5cNjXq3YGOVN1lnYeSwZKX73z5KgzoG8cMWyt6hxTIV37PCXVyZE9EHEC rMRaS+YSWXiKD7rln22XDqZ/0fef1+GgSuAkw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796043677; x=1796648477; 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=d/aC7LmsoB6dJS7q6XJILLQp4Qn1jQWGyJjHAEWRfJE=; b=Kb6ZnBngh29IPdmBqhI68F6TiRQrghG8e2eRfJcbGreSQJqZ8E7Bh57ZL2aFD5hjam 3RSWm69CHvzr5jNYlY+IGCTaGaRZxNgkjEqz0dUAM86NYb2veBYYCszlC4Zwr/UjB7Bm ZbE+BhogQzxs3mrZUI8AWybEcGxqrsNmpADbf1LXVUMN12+OWHH4xXdFX94XP0Ht+QTK bB0rIkOzFa6mv1lEzPNg/MZXeU9lLBWvelleLHU31pDZ1eHtmosImWx2/TRbm1q3BB4A 43gO6/S08yRlZdNzpSty1s2KJYMuaD0Z3OyjyiKeOo6Avu3oiYB8j/n1eE3PMiIj9q7K yyQQ== X-Gm-Message-State: APuU4Z9WWgHdQVEuFipXrsO5BmQMMpTFEmOIsTmdeuUmEQv3e/bv1iqp ayGt8Tbc8UW3eAxQLRKd/JTRtEQAejeG/w55YZ3m0Fxgs4KkjCm5THNbqFCRzk87k7XISxGsSku C4EZx63Q= X-Gm-Gg: AZFdTZfo8KxxiHIAM24AIJpqUc4RdHXBlbJ3KAiPF0vBQ5RUM8ouWOD0daUrdShQWU6 j1Ju1dbAjqyOPKs4zOmJ61MevTOl0/ikk2JEjmXF+JHsqW37Dv4S+UyMgqHmEDWt5B4cYvmSu3D LRcY7xTkOvBD99JtnRbcDQPkFFo/H5tsC1kuqlYuTpMiy+fJ5Zl3peCGDU0fOe3JCWGxWISbNfd ORoPej2lYcUAsnRj9QB4gG9oEehYLMqiu7OMjd1DaKcG3bSMMNigQk7XcZwDCqLEFAHPETgraEt 9xFXrB9ojhX7v98QKe1HUe6StjneDbNW5+HSehrUdVhxt4+WaxtlHjtPK76AT0vf3PYvEl6h0aS rpGomUrgcoBORG/jg1O7QB/2JBaEpoxnO+3BKwhLhFbCdsck6nsxUFraMbbTlmmb/cNwNNH1lzT 7VejyEbf7GYb3UlKrTugDZuiuAl3DR3K+hLLikGbmOsgP6PhtDaGKkuBk+D1UW6R4Ix2PjrVGqi H/weButwZ+uqfJhkVmWrvz8X7pGeoOGsWgX49Gjo9Az388cNBH3kc1VEj0UeH7XzTIhLj+NOit3 BZuNhsD2H57yIzuWxqHaAkHrKNBIZvFaRB3RCV3TFg== X-Received: by 2002:a05:7022:b056:20b0:1b3:ac53:da84 with SMTP id a92af1059eb24-1b5568e371bmr35715748c88.32.1796043672228; Mon, 30 Nov 2026 05:01:12 -0800 (PST) Return-Path: Received: from MVIN00013.mvista.com ([103.250.136.231]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b556840494sm78109074c88.12.2026.11.30.05.01.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 05:01:11 -0800 (PST) From: Hitendra Prajapati To: openembedded-core@lists.openembedded.org Cc: Hitendra Prajapati Subject: [scarthgap][PATCH 2/2] libxfont2: fix for CVE-2026-44950 Date: Mon, 30 Nov 2026 18:30:55 +0530 Message-ID: <20261130130055.141094-2-hprajapati@mvista.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20261130130055.141094-1-hprajapati@mvista.com> References: <20261130130055.141094-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 ; Mon, 30 Nov 2026 13:01:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251597 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/libxfont2/CVE-2026-44950.patch | 101 ++++++++++++++++++ .../xorg-lib/libxfont2_2.0.6.bb | 1 + 2 files changed, 102 insertions(+) create mode 100644 meta/recipes-graphics/xorg-lib/libxfont2/CVE-2026-44950.patch diff --git a/meta/recipes-graphics/xorg-lib/libxfont2/CVE-2026-44950.patch b/meta/recipes-graphics/xorg-lib/libxfont2/CVE-2026-44950.patch new file mode 100644 index 0000000000..fa30c0d961 --- /dev/null +++ b/meta/recipes-graphics/xorg-lib/libxfont2/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/libxfont2_2.0.6.bb b/meta/recipes-graphics/xorg-lib/libxfont2_2.0.6.bb index 67e8c99df4..ba6fa84abf 100644 --- a/meta/recipes-graphics/xorg-lib/libxfont2_2.0.6.bb +++ b/meta/recipes-graphics/xorg-lib/libxfont2_2.0.6.bb @@ -19,6 +19,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[sha256sum] = "74ca20017eb0fb3f56d8d5e60685f560fc85e5ff3d84c61c4cb891e40c27aef4"