From patchwork Sat Sep 12 11:44:27 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Anusuri X-Patchwork-Id: 98090 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC029C88E59 for ; Sat, 12 Sep 2026 11:44:52 +0000 (UTC) Received: from mail-pz2-f12.google.com (mail-pz2-f12.google.com [74.125.228.12]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.5174.1789213486615213060 for ; Sat, 12 Sep 2026 04:44:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=YiQkAcik; spf=pass (domain: mvista.com, ip: 74.125.228.12, mailfrom: vanusuri@mvista.com) Received: by mail-pz2-f12.google.com with SMTP id 41be03b00d2f7-cc1cea50db3so203618a12.1 for ; Sat, 12 Sep 2026 04:44:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1789213486; x=1789818286; 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=lYnDnCZgTrjirPOykrG8jMJXU67F+OsarBUeH5f6AG4=; b=YiQkAcikcQEfwaX7rYZHH6lBFuoDzltGfKSVINPIScaMadikdaBwFGU4q/DhdkwYEz /Yf2/AKkCVQUAuVtSkIlNHU3278Pqhnbn4E2+d1UllviAMK7z7ABpIHb0zEUkcbgIj8X FQ5n2RaSaXVyPoHhECGylJWlgeiBnyULPsD94= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789213486; x=1789818286; 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=lYnDnCZgTrjirPOykrG8jMJXU67F+OsarBUeH5f6AG4=; b=nllEC6IPcBw0i8bpLpYVt9ize1Po9PjSZNK4O1ewYPKfMwfygh5lxdienvDJypExTU ZmvhT8KenlzJFf9MPGLqcDuVK4LIdWo56OZosml6yonONlbNV9g3FRtcg6Bcb48BEw6o eOnV0Wp9CoY33Da07PfLHC8SyshvTu2rDcpqQ2AJ/BSX+fYOZtyioEtU3lrneWrzxNmO 0yW9LmGFyYuIsKw95GL9Z5fL0z77d0CW1ZdPGvRn86rHbg9NBBnBRCZgMpKilSaIGQN1 6MT3naZP6M2YfatFIVklg0csmjQkO0D2DCTBdj1c8el658YdZNjjaoQpK4ZavlQ45H3J ZzPw== X-Gm-Message-State: AFuF++lFWabm4Y5AzuLc+zel5uAItx2LqGImiJqGOdvXicFMkx5Rwxzd q045y0oHG58K2X8klhLh+4O/Z22eyfLiJrvbH1o+/VQZwY2N/tgvWX5CWn07MMvTcjWfIZBVenh qS1AO X-Gm-Gg: AYBFou2X444UeTxaOV1wPlRrooctjQqa9v08R+nvNpYY6sj4Z/jvrQ61fdqszWPpB+R 9GgbFqq4W+hsuROMp2A/Nhv+va2R9N/EbwHM3nlk7oSJGTDYZdriOah50xAvguCgzyhBmxhFHLm wTPSsNcph90EubokjZxwQzgMHKqWywm6s2S8mJfcnu3DU1cTEA+MOFQu+OJGBuOZAJSdVMrIQyp WZQOBc9YFwzPiQalC4GZvkBwOenlIeLS+Lqq5gbiCOBCdViarNgkKcuWY2S9AWn147hDXVShj/D xW/ykwngdM4wngd8xCw5sT9IMJrpY6NxgIMOF7VCJJM7D6P7KfhUWfy+iekSHE6oeoAMwt1Xcim 0IVL1/64qOvmQ+8cjiqlL5cbKkrVsSoNf0gN9QlxDMHlsNEENV5jM3VIzpbnnl4s+OnIF8BOqXw cEymRuWmm3yVpGhjlDmjbo7sSeo5O2+rcV+rOj8bxM1aM4E9FKjxjpwrbg6GFYaBg/s8ebbc5fV UiAp/gGO1et5FOg0Qpi8nKF X-Received: by 2002:a05:6a21:6016:b0:3cc:9618:f51a with SMTP id adf61e73a8af0-3db0e0ea40amr4315283637.8.1789213485930; Sat, 12 Sep 2026 04:44:45 -0700 (PDT) Received: from MVIN00352.mvista.com ([2401:4900:1cc4:2919:ff34:c674:1b5:9893]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-33ba4ed295esm15044987eec.15.2026.09.12.04.44.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2026 04:44:45 -0700 (PDT) From: Vijay Anusuri To: openembedded-core@lists.openembedded.org Cc: Vijay Anusuri Subject: [OE-core][scarthgap][patch v2 1/4] libxfont: Drop obsolete md5sum checksum Date: Sat, 12 Sep 2026 17:14:27 +0530 Message-ID: <20260912114431.357816-1-vanusuri@mvista.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 12 Sep 2026 11:44:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/245696 Signed-off-by: Vijay Anusuri --- meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb | 1 - 1 file changed, 1 deletion(-) 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 fa6585d6dc..9ec7cc30f5 100644 --- a/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb +++ b/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb @@ -19,7 +19,6 @@ XORG_EXT = "tar.bz2" BBCLASSEXTEND = "native" -SRC_URI[md5sum] = "16eaf156edd79b68038b6a7c44aa9e9b" SRC_URI[sha256sum] = "1a7f7490774c87f2052d146d1e0e64518d32e6848184a18654e8d0bb57883242" PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" From patchwork Sat Sep 12 11:44:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Anusuri X-Patchwork-Id: 98091 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BAE4C88E53 for ; Sat, 12 Sep 2026 11:44:52 +0000 (UTC) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.5176.1789213490975424493 for ; Sat, 12 Sep 2026 04:44:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=eQWdDzFf; spf=pass (domain: mvista.com, ip: 209.85.214.176, mailfrom: vanusuri@mvista.com) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-2cfbbdfa60bso18010595ad.3 for ; Sat, 12 Sep 2026 04:44:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1789213490; x=1789818290; 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=NcccRXowwmnU1rPmY/+Ps/CYvntu/L65eo463ydbtnQ=; b=eQWdDzFfUunOZw6k5lLPXRC/OGYJPCHh1JTVm7EqbrgzAkbyqLcTVatCqm0NUnYtwD 6qly74pWIhGwMssmU8aYZyH33O7bUJR0lCj2VxajDnRYlbCfKA9Bw8U7kSAzOZHkgPY+ pZzkPoqGY7xKaCVMI6f+FfzjWmry+XgiG5Fk4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789213490; x=1789818290; 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=NcccRXowwmnU1rPmY/+Ps/CYvntu/L65eo463ydbtnQ=; b=OaawDE8rRK66/n4MtL5voCW47WcvS/eYRZ+s/FtDmFYNhRpQZfWRB3KZVBI2Wd1fuL 88OFP50agYPEmRF4EJ7R9SWFuCTTbcXRKsQGFACRV8mztIW1kunWLCcDlIWDmpa9dxBh ca6IOXtCkfvVaROuAyJzCKJInRxuLEML/TQdky9I8Ls8Z5DKBEYrJKaeotsjfBkCam7V VkGreYxeHIbJcZfkijlLGnDSW+vSojuT1BEbfatsxqH9mAB1BeSQbmbWkFB333ul2U4R ZKO/JR9GMG6IM4PrwH82ZtBJVaQPWDa9jPz4sJCNQTRsY749+QnGXmHMMV59CCrzeoTN /Wtg== X-Gm-Message-State: AFuF++kmljsHuArGLjDAvKH6FojjclXx1XbGgVMSDbb8v9tWNNR+6obp jsxoKAES5i2/96FYY2vZ3T7FOflQ5P3BZU+7tyR7MITK0LmNCyDoOgWjCQurPaZ3EMkIdl0BXUc sqKbl X-Gm-Gg: AYBFou0K4qDn7fiAJI4vHaS2D6vvNOrkfT+pwL2WpPM6zTLDyVgGTwR2a6QedhQjvQ4 uDZM61E6mvqaJHcdqGdP6KoK1NayeEr3fY3GGGloSfrXbfmoSuWb23mVXZ9KBeJdL0U3nXo/MDZ 5XZEQvL488as/UCoeKsN8j2Out+ke+S1eyYmFViqjH6NsLd3PbnxBXOLg4tzFy0eWii+T724qJ1 Hu09ypkYwgLy67R11carma26nqXlwkIUZgVICGn2b5ERzWgYAz5xW8SQokTaRdgLFx8ejjrQNvy 7UEUShU2Z80Vz8qm9E8BZiPOXEWDyb/c1ii+MgWuPhS/awG0ic9t1o5iDVoQBXWoXSwJIkRR0Ay 182lZxGrsHongGqSyktAkCSBZtsPu19TPsmRff11SSoUcWAc5KfrnoitVDMtsKgSXZgPeLojtV1 KEDmzAX+Clh7Hkz8pgqShBSi1z4oRPRoB2+Gw/AQylkxkDIbaV9kwvjnnmuJEfDXFg7ULw7LS7+ bi2EvmRHYAUAw== X-Received: by 2002:a17:902:ecd2:b0:2db:5ea1:8b04 with SMTP id d9443c01a7336-2dd2a1c3e4fmr144802025ad.5.1789213490270; Sat, 12 Sep 2026 04:44:50 -0700 (PDT) Received: from MVIN00352.mvista.com ([2401:4900:1cc4:2919:ff34:c674:1b5:9893]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-33ba4ed295esm15044987eec.15.2026.09.12.04.44.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2026 04:44:49 -0700 (PDT) From: Vijay Anusuri To: openembedded-core@lists.openembedded.org Cc: Vijay Anusuri Subject: [OE-core][scarthgap][patch v2 2/4] libxfont: Fix CVE-2026-56001 Date: Sat, 12 Sep 2026 17:14:28 +0530 Message-ID: <20260912114431.357816-2-vanusuri@mvista.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260912114431.357816-1-vanusuri@mvista.com> References: <20260912114431.357816-1-vanusuri@mvista.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 12 Sep 2026 11:44:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/245697 Pick patch according to [2] [1] https://nvd.nist.gov/vuln/detail/CVE-2026-56001 [2] https://security-tracker.debian.org/tracker/CVE-2026-56001 Signed-off-by: Vijay Anusuri --- .../xorg-lib/libxfont/CVE-2026-56001.patch | 87 +++++++++++++++++++ .../xorg-lib/libxfont_1.5.4.bb | 3 + 2 files changed, 90 insertions(+) create mode 100644 meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-56001.patch diff --git a/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-56001.patch b/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-56001.patch new file mode 100644 index 0000000000..1de7f3e037 --- /dev/null +++ b/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-56001.patch @@ -0,0 +1,87 @@ +From be0b08e2d354138d3222b4490e2a77c6ee42f778 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 1 Jun 2026 16:46:10 +1000 +Subject: [PATCH] bitscale: fix integer overflow in BitmapScaleBitmaps + bytestoalloc + +bytestoalloc is declared as unsigned int (32-bit). When the sum of +per-glyph byte counts exceeds 2^32, the value wraps around and calloc() +allocates a buffer that is too small. The subsequent ScaleBitmap loop +then writes past the end of the allocated buffer. + +Change bytestoalloc from unsigned int to size_t to match the actual +allocation size type, and add an explicit overflow check in the +accumulation loop to bail out if the total would exceed SIZE_MAX. + +This vulnerability was discovered by: +Anonymous working with TrendAI Zero Day Initiative + +CVE-2026-56001/ZDI-CAN-30558 + +Assisted-by: Claude:claude-opus-4-6 +Signed-off-by: Peter Hutterer +Part-of: + +Note: 'SIZE_MAX' is defined in header ''. Add '#include +' to fix build failure. + +Upstream-Status: Backport [import from debian libxfont1 1.5.2-4+deb9u1 +Upstream commit https://gitlab.freedesktop.org/xorg/lib/libxfont/-/commit/be0b08e2d354138d3222b4490e2a77c6ee42f778] +CVE: CVE-2026-56001 +Signed-off-by: Vijay Anusuri +--- + src/bitmap/bitscale.c | 24 +++++++++++++++++++++--- + 1 file changed, 21 insertions(+), 3 deletions(-) + +diff --git a/src/bitmap/bitscale.c b/src/bitmap/bitscale.c +index 13ed924..32144d6 100644 +--- a/src/bitmap/bitscale.c ++++ b/src/bitmap/bitscale.c +@@ -38,6 +38,7 @@ from The Open Group. + #include + #include + #include ++#include + + #ifndef MAX + #define MAX(a,b) (((a)>(b)) ? a : b) +@@ -1459,7 +1460,7 @@ BitmapScaleBitmaps(FontPtr pf, /* scaled font */ + opci; + FontInfoPtr pfi; + int glyph; +- unsigned bytestoalloc = 0; ++ size_t bytestoalloc = 0; + int firstCol, lastCol, firstRow, lastRow; + + double xform[4], inv_xform[4]; +@@ -1486,8 +1487,25 @@ BitmapScaleBitmaps(FontPtr pf, /* scaled font */ + glyph = pf->glyph; + for (i = 0; i < nchars; i++) + { +- if ((pci = ACCESSENCODING(bitmapFont->encoding, i))) +- bytestoalloc += BYTES_FOR_GLYPH(pci, glyph); ++ if ((pci = ACCESSENCODING(bitmapFont->encoding, i))) { ++ size_t glyphsize = BYTES_FOR_GLYPH(pci, glyph); ++ if (bytestoalloc > SIZE_MAX - glyphsize) { ++ fprintf(stderr, ++ "Error: bitmap allocation overflow for scaled font\n"); ++ goto bail; ++ } ++ bytestoalloc += glyphsize; ++ } ++ } ++ ++ /* Reject unreasonably large bitmap allocations that could result ++ * from malicious fonts with extreme scale factors. 256 MiB is ++ * far beyond any legitimate scaled bitmap font. */ ++#define BITMAP_SCALE_MAX_ALLOC (256 * 1024 * 1024) ++ if (bytestoalloc > BITMAP_SCALE_MAX_ALLOC) { ++ fprintf(stderr, ++ "Error: scaled bitmap size %zu exceeds limit\n", bytestoalloc); ++ goto bail; + } + + /* Do we add the font malloc stuff for VALUE ADDED ? */ +-- +2.43.0 + 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 9ec7cc30f5..59c489b785 100644 --- a/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb +++ b/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb @@ -19,6 +19,9 @@ XORG_EXT = "tar.bz2" BBCLASSEXTEND = "native" +SRC_URI += "file://CVE-2026-56001.patch \ + " + SRC_URI[sha256sum] = "1a7f7490774c87f2052d146d1e0e64518d32e6848184a18654e8d0bb57883242" PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" From patchwork Sat Sep 12 11:44:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Anusuri X-Patchwork-Id: 98093 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7681FC88E59 for ; Sat, 12 Sep 2026 11:45:02 +0000 (UTC) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.5081.1789213495933145318 for ; Sat, 12 Sep 2026 04:44:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=GZ5Rt1lJ; spf=pass (domain: mvista.com, ip: 209.85.214.177, mailfrom: vanusuri@mvista.com) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2db3305f94fso26262905ad.0 for ; Sat, 12 Sep 2026 04:44:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1789213495; x=1789818295; 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=/W/giLEX1H0um6HjVd+aiJIv1tD2m/eq9KfixhGlTlg=; b=GZ5Rt1lJV+I/9t0OuXXr+7fiIiDJbirHNDpPJtcI6VWTSE3BaZI5p/k3qv6i4jHI1o SDxg6F+O1S/kgrDj/NUaP7QqDU38SLGpkyy/FoYMkBhSM5F63C7fVHICyo5yDN+hh/pt q9o2KsXpeFsGrMHFOkhMT64/FtLumjPW7JeNY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789213495; x=1789818295; 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=/W/giLEX1H0um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2002:a17:90b:17c9:b0:396:5f7f:52f5 with SMTP id 98e67ed59e1d1-39d9bbea1c6mr13357668a91.3.1789213495183; Sat, 12 Sep 2026 04:44:55 -0700 (PDT) Received: from MVIN00352.mvista.com ([2401:4900:1cc4:2919:ff34:c674:1b5:9893]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-33ba4ed295esm15044987eec.15.2026.09.12.04.44.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2026 04:44:54 -0700 (PDT) From: Vijay Anusuri To: openembedded-core@lists.openembedded.org Cc: Vijay Anusuri Subject: [OE-core][scarthgap][patch v2 3/4] libxfont: Fix CVE-2026-56002 Date: Sat, 12 Sep 2026 17:14:29 +0530 Message-ID: <20260912114431.357816-3-vanusuri@mvista.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260912114431.357816-1-vanusuri@mvista.com> References: <20260912114431.357816-1-vanusuri@mvista.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 12 Sep 2026 11:45:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/245698 Pick patch according to [2] [1] https://nvd.nist.gov/vuln/detail/CVE-2026-56002 [2] https://security-tracker.debian.org/tracker/CVE-2026-56002 Signed-off-by: Vijay Anusuri --- .../xorg-lib/libxfont/CVE-2026-56002.patch | 150 ++++++++++++++++++ .../xorg-lib/libxfont_1.5.4.bb | 1 + 2 files changed, 151 insertions(+) create mode 100644 meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-56002.patch diff --git a/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-56002.patch b/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-56002.patch new file mode 100644 index 0000000000..cef8a06a68 --- /dev/null +++ b/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-56002.patch @@ -0,0 +1,150 @@ +From b4389e0b1d84a690b819bb27b1439968811a3674 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 1 Jun 2026 16:48:40 +1000 +Subject: [PATCH] pcfread: validate bitmap sizes and offsets against per-glyph + metrics + +pcfReadFont() uses bitmapSizes[] read directly from the PCF file to +allocate the repadded bitmap buffer. However, per-glyph metrics (also +from the file) control how much data RepadBitmap() writes. A malicious +PCF font can declare a small bitmapSizes[] value while having per-glyph +metrics that require more space, causing a heap buffer overflow. + +A similar issue happens with the encoding offsets: pcfReadFont reads +encoding offsets from the PCF file and uses them to index into the +metrics array without bounds checking. A crafted font can set an +encoding offset larger than nmetrics, causing an out-of-bounds pointer +that is later dereferenced when glyphs are accessed through the encoding +table. + +And the no-repad bitmap path (when PCF_GLYPH_PAD matches the requested +glyph pad) only validated that each glyph's offset was within the bitmap +buffer, but did not check that the full glyph extent (offset + +BYTES_PER_ROW * height) fits within the buffer. A crafted font with a +glyph offset near the end of a small bitmap buffer but large glyph +metrics causes a heap buffer over-read when the glyph is later rendered. + +This vulnerability was discovered by: + Anonymous working with TrendAI Zero Day Initiative + +CVE-2026-56002/ZDI-CAN-30559 + +Assisted-by: Claude:claude-opus-4-6 +Signed-off-by: Peter Hutterer +Part-of: + +Note: 'INT_MAX' is defined in header ''. Add '#include +' to fix build failure. + +Upstream-Status: Backport [import from debian libxfont1 1.5.2-4+deb9u1 +Upstream commit https://gitlab.freedesktop.org/xorg/lib/libxfont/-/commit/b4389e0b1d84a690b819bb27b1439968811a3674] +CVE: CVE-2026-56002 +Signed-off-by: Vijay Anusuri +--- + src/bitmap/pcfread.c | 60 +++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 57 insertions(+), 3 deletions(-) + +diff --git a/src/bitmap/pcfread.c b/src/bitmap/pcfread.c +index 4a372c5..0cc9777 100644 +--- a/src/bitmap/pcfread.c ++++ b/src/bitmap/pcfread.c +@@ -45,6 +45,7 @@ from The Open Group. + #include + #include + #include ++#include + + void + pcfError(const char* message, ...) +@@ -529,25 +530,74 @@ pcfReadFont(FontPtr pFont, FontFilePtr file, + int old, + new; + xCharInfo *metric; ++ int srcPad = PCF_GLYPH_PAD(format); + +- sizepadbitmaps = bitmapSizes[PCF_SIZE_TO_INDEX(glyph)]; +- padbitmaps = malloc(sizepadbitmaps); ++ /* Compute the actual required size from per-glyph metrics instead ++ * of trusting the file's bitmapSizes[] value, which may be smaller ++ * than the actual data written by RepadBitmap. */ ++ sizepadbitmaps = 0; ++ for (i = 0; i < nbitmaps; i++) { ++ int w, h, glyphBytes; ++ metric = &metrics[i].metrics; ++ w = metric->rightSideBearing - metric->leftSideBearing; ++ h = metric->ascent + metric->descent; ++ glyphBytes = BYTES_PER_ROW(w, glyph) * h; ++ if (glyphBytes < 0 || (glyphBytes > 0 && sizepadbitmaps > INT_MAX - glyphBytes)) { ++ pcfError("pcfReadFont(): bitmap size overflow\n"); ++ goto Bail; ++ } ++ sizepadbitmaps += glyphBytes; ++ } ++ padbitmaps = malloc(sizepadbitmaps ? sizepadbitmaps : 1); + if (!padbitmaps) { + pcfError("pcfReadFont(): Couldn't allocate padbitmaps (%d)\n", sizepadbitmaps); + goto Bail; + } + new = 0; + for (i = 0; i < nbitmaps; i++) { ++ int srcGlyphBytes; ++ + old = offsets[i]; + metric = &metrics[i].metrics; ++ ++ /* Validate source offset and source glyph size against the ++ * source bitmap buffer to prevent out-of-bounds reads. */ ++ srcGlyphBytes = BYTES_PER_ROW( ++ metric->rightSideBearing - metric->leftSideBearing, ++ srcPad) * (metric->ascent + metric->descent); ++ if (old < 0 || old > sizebitmaps || ++ srcGlyphBytes < 0 || srcGlyphBytes > sizebitmaps - old) { ++ pcfError("pcfReadFont(): bitmap offset/size out of bounds\n"); ++ free(padbitmaps); ++ goto Bail; ++ } ++ + offsets[i] = new; + new += RepadBitmap(bitmaps + old, padbitmaps + new, +- PCF_GLYPH_PAD(format), glyph, ++ srcPad, glyph, + metric->rightSideBearing - metric->leftSideBearing, + metric->ascent + metric->descent); + } + free(bitmaps); + bitmaps = padbitmaps; ++ } else { ++ /* Validate offsets and full glyph extents against bitmap buffer */ ++ for (i = 0; i < nbitmaps; i++) { ++ int glyphBytes; ++ xCharInfo *metric = &metrics[i].metrics; ++ ++ glyphBytes = BYTES_PER_ROW( ++ metric->rightSideBearing - metric->leftSideBearing, ++ glyph) * (metric->ascent + metric->descent); ++ if (offsets[i] >= (CARD32)sizebitmaps || ++ glyphBytes < 0 || ++ glyphBytes > sizebitmaps - (int)offsets[i]) { ++ pcfError("pcfReadFont(): bitmap offset/size out of bounds " ++ "(offset %u, size %d, total %d)\n", ++ offsets[i], glyphBytes, sizebitmaps); ++ goto Bail; ++ } ++ } + } + for (i = 0; i < nbitmaps; i++) + metrics[i].bits = bitmaps + offsets[i]; +@@ -622,6 +672,10 @@ pcfReadFont(FontPtr pFont, FontFilePtr file, + if (IS_EOF(file)) goto Bail; + if (encodingOffset == 0xFFFF) { + pFont->info.allExist = FALSE; ++ } else if (encodingOffset >= nmetrics) { ++ pcfError("pcfReadFont(): encoding offset %d out of range (nmetrics=%d)\n", ++ encodingOffset, nmetrics); ++ goto Bail; + } else { + if(!encoding[SEGMENT_MAJOR(i)]) { + encoding[SEGMENT_MAJOR(i)]= +-- +2.43.0 + 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 59c489b785..08c96fdac8 100644 --- a/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb +++ b/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb @@ -20,6 +20,7 @@ XORG_EXT = "tar.bz2" BBCLASSEXTEND = "native" SRC_URI += "file://CVE-2026-56001.patch \ + file://CVE-2026-56002.patch \ " SRC_URI[sha256sum] = "1a7f7490774c87f2052d146d1e0e64518d32e6848184a18654e8d0bb57883242" From patchwork Sat Sep 12 11:44:30 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Anusuri X-Patchwork-Id: 98092 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6ACFEC79FB6 for ; Sat, 12 Sep 2026 11:45:02 +0000 (UTC) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.5082.1789213500839950710 for ; Sat, 12 Sep 2026 04:45:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista.com header.s=google header.b=BbmcnnNG; spf=pass (domain: mvista.com, ip: 209.85.214.175, mailfrom: vanusuri@mvista.com) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2dd4b3c752fso8089295ad.3 for ; Sat, 12 Sep 2026 04:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista.com; s=google; t=1789213500; x=1789818300; 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=3mwRbOG4QfQ6ffFbg3rxgn/ypSlSKdmtay4w52zhy0c=; b=BbmcnnNGMt5Hso3gtgHOBncLiOk+ETrsDngT2vninouhnkF6VMFRqSyPKK9U/mSkDF Jjx7DwP/6tVGNYTj69xwe00XBFDUhJ/T2Rl99Hvm5WHHtfpVfLbWsR/prtnGgxT/wB8m IBaZZcwXGS3KIL5mca32Oyl2RqKR4JQBA8ZIE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789213500; x=1789818300; 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=3mw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 2002:a17:902:ecc5:b0:2d6:ffa1:429b with SMTP id d9443c01a7336-2dd2a1dda3emr159639995ad.7.1789213500063; Sat, 12 Sep 2026 04:45:00 -0700 (PDT) Received: from MVIN00352.mvista.com ([2401:4900:1cc4:2919:ff34:c674:1b5:9893]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-33ba4ed295esm15044987eec.15.2026.09.12.04.44.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2026 04:44:59 -0700 (PDT) From: Vijay Anusuri To: openembedded-core@lists.openembedded.org Cc: Vijay Anusuri Subject: [OE-core][scarthgap][patch v2 4/4] libxfont: Fix CVE-2026-56003 Date: Sat, 12 Sep 2026 17:14:30 +0530 Message-ID: <20260912114431.357816-4-vanusuri@mvista.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260912114431.357816-1-vanusuri@mvista.com> References: <20260912114431.357816-1-vanusuri@mvista.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 12 Sep 2026 11:45:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/245699 Pick patch according to [2] [1] https://nvd.nist.gov/vuln/detail/CVE-2026-56003 [2] https://security-tracker.debian.org/tracker/CVE-2026-56003 Signed-off-by: Vijay Anusuri --- .../xorg-lib/libxfont/CVE-2026-56003.patch | 114 ++++++++++++++++++ .../xorg-lib/libxfont_1.5.4.bb | 1 + 2 files changed, 115 insertions(+) create mode 100644 meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-56003.patch diff --git a/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-56003.patch b/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-56003.patch new file mode 100644 index 0000000000..0092c712d4 --- /dev/null +++ b/meta/recipes-graphics/xorg-lib/libxfont/CVE-2026-56003.patch @@ -0,0 +1,114 @@ +From dff957a5158da038a282a59a31fe736702732939 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 1 Jun 2026 16:49:55 +1000 +Subject: [PATCH] bitscale: add bounds check to computeProps for property + buffer + +ComputeScaledProperties allocates a fixed-size property buffer of 70 +slots. computeProps iterates the source font's properties and writes 1 +slot for unscaled properties or 2 slots for scaledX/scaledY properties, +with no bounds check. A malicious font with many duplicate properties +matching fontPropTable entries can overflow the allocated buffer. + +Fix this by passing the remaining buffer capacity to computeProps and +checking it before each write. Properties that would exceed the buffer +are silently skipped. + +The function is also restructured to handle the buffer writes for +scaledX/scaledY inside the switch cases directly, rather than in a +separate block after the switch. This makes the control flow clearer and +ensures the bounds check covers all writes. + +This vulnerability was discovered by: +Anonymous working with TrendAI Zero Day Initiative + +CVE-2026-56003/ZDI-CAN-30560 + +Assisted-by: Claude:claude-opus-4-6 +Signed-off-by: Peter Hutterer +Part-of: + +Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/lib/libxfont/-/commit/dff957a5158da038a282a59a31fe736702732939] +CVE: CVE-2026-56003 +Signed-off-by: Vijay Anusuri +--- + src/bitmap/bitscale.c | 39 ++++++++++++++++++++------------------- + 1 file changed, 20 insertions(+), 19 deletions(-) + +diff --git a/src/bitmap/bitscale.c b/src/bitmap/bitscale.c +index 32144d6..2affc11 100644 +--- a/src/bitmap/bitscale.c ++++ b/src/bitmap/bitscale.c +@@ -513,7 +513,8 @@ static int + computeProps(FontPropPtr pf, char *wasStringProp, + FontPropPtr npf, char *isStringProp, + unsigned int nprops, double xfactor, double yfactor, +- double sXfactor, double sYfactor) ++ double sXfactor, double sYfactor, ++ int maxprops) + { + int n; + int count; +@@ -528,14 +529,26 @@ computeProps(FontPropPtr pf, char *wasStringProp, + + switch (t->type) { + case scaledX: +- npf->value = doround(xfactor * (double)pf->value); +- rawfactor = sXfactor; +- break; + case scaledY: +- npf->value = doround(yfactor * (double)pf->value); +- rawfactor = sYfactor; ++ if (count + 2 > maxprops) ++ continue; ++ npf->value = (t->type == scaledX) ++ ? doround(xfactor * (double)pf->value) ++ : doround(yfactor * (double)pf->value); ++ rawfactor = (t->type == scaledX) ? sXfactor : sYfactor; ++ npf->name = pf->name; ++ npf++; ++ count++; ++ npf->value = doround(rawfactor * (double)pf->value); ++ npf->name = rawFontPropTable[t - fontPropTable].atom; ++ npf++; ++ count++; ++ *isStringProp++ = *wasStringProp; ++ *isStringProp++ = *wasStringProp; + break; + case unscaled: ++ if (count + 1 > maxprops) ++ continue; + npf->value = pf->value; + npf->name = pf->name; + npf++; +@@ -545,18 +558,6 @@ computeProps(FontPropPtr pf, char *wasStringProp, + default: + break; + } +- if (t->type != unscaled) +- { +- npf->name = pf->name; +- npf++; +- count++; +- npf->value = doround(rawfactor * (double)pf->value); +- npf->name = rawFontPropTable[t - fontPropTable].atom; +- npf++; +- count++; +- *isStringProp++ = *wasStringProp; +- *isStringProp++ = *wasStringProp; +- } + } + return count; + } +@@ -671,7 +672,7 @@ ComputeScaledProperties(FontInfoPtr sourceFontInfo, /* the font to be scaled */ + n = NPROPS; + n += computeProps(sourceFontInfo->props, sourceFontInfo->isStringProp, + fp, isStringProp, sourceFontInfo->nprops, dx, dy, +- sdx, sdy); ++ sdx, sdy, nProps - NPROPS); + return n; + } + +-- +2.43.0 + 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 08c96fdac8..e254516fcf 100644 --- a/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb +++ b/meta/recipes-graphics/xorg-lib/libxfont_1.5.4.bb @@ -21,6 +21,7 @@ BBCLASSEXTEND = "native" SRC_URI += "file://CVE-2026-56001.patch \ file://CVE-2026-56002.patch \ + file://CVE-2026-56003.patch \ " SRC_URI[sha256sum] = "1a7f7490774c87f2052d146d1e0e64518d32e6848184a18654e8d0bb57883242"