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"