From 59f8c396f936e99770e6876af1e68e27d696857c Mon Sep 17 00:00:00 2001 From: "Hugo SIMELIERE (Schneider Electric)" Date: Wed, 20 May 2026 13:50:32 +0200 Subject: [PATCH] nss: Fix CVE-2026-2781 Pick patch from [1] as 3.9X upstream mirror backport of [2] mentioned in Debian report in [3]. [1] https://github.com/nss-dev/nss/commit/870d3b013e6b39540d14e67b3db89da5a96381bf [2] https://hg-edge.mozilla.org/projects/nss/rev/245385e16fa6 [3] https://security-tracker.debian.org/tracker/CVE-2026-2781 Signed-off-by: Hugo SIMELIERE (Schneider Electric) Reviewed-by: Bruno VERNAY Signed-off-by: Anuj Mittal --- .../nss/nss/CVE-2026-2781.patch | 36 +++++++++++++++++++ meta-oe/recipes-support/nss/nss_3.98.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta-oe/recipes-support/nss/nss/CVE-2026-2781.patch diff --git a/meta-oe/recipes-support/nss/nss/CVE-2026-2781.patch b/meta-oe/recipes-support/nss/nss/CVE-2026-2781.patch new file mode 100644 index 0000000000..8c1798ec04 --- /dev/null +++ b/meta-oe/recipes-support/nss/nss/CVE-2026-2781.patch @@ -0,0 +1,36 @@ +From fc8a94cca3150a59075ae3fba82ae9758df0b187 Mon Sep 17 00:00:00 2001 +From: John Schanck +Date: Wed, 11 Feb 2026 17:21:49 +0000 +Subject: [PATCH] Bug 2009552 - avoid integer overflow in platform-independent + ghash. r=#nss-reviewers + +Differential Revision: https://phabricator.services.mozilla.com/D278681 + +--HG-- +branch : NSS_3_90_BRANCH + +CVE: CVE-2026-2781 +Upstream-Status: Backport [https://github.com/nss-dev/nss/commit/870d3b013e6b39540d14e67b3db89da5a96381bf] + +(cherry picked from commit 870d3b013e6b39540d14e67b3db89da5a96381bf) +Signed-off-by: Hugo SIMELIERE (Schneider Electric) +--- + nss/lib/freebl/gcm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/nss/lib/freebl/gcm.c b/nss/lib/freebl/gcm.c +index 9ee7fc89b..d1410a9ad 100644 +--- a/nss/lib/freebl/gcm.c ++++ b/nss/lib/freebl/gcm.c +@@ -355,7 +355,7 @@ gcmHash_Update(gcmHashContext *ghash, const unsigned char *buf, + unsigned int blocks; + SECStatus rv; + +- ghash->cLen += (len * PR_BITS_PER_BYTE); ++ ghash->cLen += ((uint64_t)len * PR_BITS_PER_BYTE); + + /* first deal with the current buffer of data. Try to fill it out so + * we can hash it */ +-- +2.43.0 + diff --git a/meta-oe/recipes-support/nss/nss_3.98.bb b/meta-oe/recipes-support/nss/nss_3.98.bb index 9218b4d30b..0937b28bd5 100644 --- a/meta-oe/recipes-support/nss/nss_3.98.bb +++ b/meta-oe/recipes-support/nss/nss_3.98.bb @@ -34,6 +34,7 @@ SRC_URI = "http://ftp.mozilla.org/pub/security/nss/releases/${VERSION_DIR}/src/$ file://0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch \ file://CVE-2024-6602.patch \ file://CVE-2024-6609.patch \ + file://CVE-2026-2781.patch \ " SRC_URI[sha256sum] = "f549cc33d35c0601674bfacf7c6ad683c187595eb4125b423238d3e9aa4209ce"