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) <hsimeliere.opensource@witekio.com>
Reviewed-by: Bruno VERNAY <bruno.vernay@se.com>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
This commit is contained in:
Hugo SIMELIERE (Schneider Electric)
2026-05-20 13:50:32 +02:00
committed by Anuj Mittal
parent 7acc744194
commit 59f8c396f9
2 changed files with 37 additions and 0 deletions
@@ -0,0 +1,36 @@
From fc8a94cca3150a59075ae3fba82ae9758df0b187 Mon Sep 17 00:00:00 2001
From: John Schanck <jschanck@mozilla.com>
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) <hsimeliere.opensource@witekio.com>
---
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
+1
View File
@@ -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"