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"