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"