mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-09-28 22:19:17 +00:00
Details: https://nvd.nist.gov/vuln/detail/CVE-2026-4159 Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
From 4de19e3894e81eeaf3079b1270813d0a2b7fe69c Mon Sep 17 00:00:00 2001
|
|
From: Josh Holtrop <josh@wolfssl.com>
|
|
Date: Tue, 10 Mar 2026 17:26:28 -0400
|
|
Subject: [PATCH] Avoid one-byte read outside of allocated encrypted content
|
|
buffer in wc_PKCS7_DecodeEnvelopedData()
|
|
|
|
(cherry picked from commit d37b51c3cef6897e117364ab8b1a257e52a634c0)
|
|
|
|
CVE: CVE-2026-4159
|
|
Upstream-Status: Backport [https://github.com/wolfSSL/wolfssl/commit/d37b51c3cef6897e117364ab8b1a257e52a634c0]
|
|
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
|
|
---
|
|
wolfcrypt/src/pkcs7.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/wolfcrypt/src/pkcs7.c b/wolfcrypt/src/pkcs7.c
|
|
index 4ba96c90d..e65ddd493 100644
|
|
--- a/wolfcrypt/src/pkcs7.c
|
|
+++ b/wolfcrypt/src/pkcs7.c
|
|
@@ -12853,6 +12853,12 @@ WOLFSSL_API int wc_PKCS7_DecodeEnvelopedData(wc_PKCS7* pkcs7, byte* in,
|
|
/* use cached content */
|
|
encryptedContent = pkcs7->cachedEncryptedContent;
|
|
encryptedContentSz = (int)pkcs7->cachedEncryptedContentSz;
|
|
+
|
|
+ if (encryptedContentSz <= 0) {
|
|
+ ret = BUFFER_E;
|
|
+ break;
|
|
+ }
|
|
+
|
|
padLen = encryptedContent[encryptedContentSz-1];
|
|
|
|
/* copy plaintext to output */
|