From e4fbbe5138ccea82628b163370ba379f0b59b83f Mon Sep 17 00:00:00 2001 From: Ankur Tyagi Date: Mon, 6 Apr 2026 00:49:04 +1200 Subject: [PATCH] wolfssl: patch CVE-2026-0819 Details: https://nvd.nist.gov/vuln/detail/CVE-2026-0819 Signed-off-by: Ankur Tyagi Signed-off-by: Anuj Mittal --- .../wolfssl/files/CVE-2026-0819.patch | 31 +++++++++++++++++++ .../wolfssl/wolfssl_5.8.0.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta-networking/recipes-connectivity/wolfssl/files/CVE-2026-0819.patch diff --git a/meta-networking/recipes-connectivity/wolfssl/files/CVE-2026-0819.patch b/meta-networking/recipes-connectivity/wolfssl/files/CVE-2026-0819.patch new file mode 100644 index 0000000000..0594a8e03f --- /dev/null +++ b/meta-networking/recipes-connectivity/wolfssl/files/CVE-2026-0819.patch @@ -0,0 +1,31 @@ +From ce42215d0dd20742b378211671117db4e6f7e729 Mon Sep 17 00:00:00 2001 +From: Reda Chouk +Date: Thu, 8 Jan 2026 19:57:24 +0100 +Subject: [PATCH] Increment signedAttribsCount with the right number of + attributes it encoded + +(cherry picked from commit 9c7b58656541e8d31876d7ccd2cd38140b8ffb79) + +CVE: CVE-2026-0819 +Upstream-Status: Backport [https://github.com/wolfSSL/wolfssl/commit/9c7b58656541e8d31876d7ccd2cd38140b8ffb79] +Signed-off-by: Ankur Tyagi +--- + wolfcrypt/src/pkcs7.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/wolfcrypt/src/pkcs7.c b/wolfcrypt/src/pkcs7.c +index a8545ba0a..4ba96c90d 100644 +--- a/wolfcrypt/src/pkcs7.c ++++ b/wolfcrypt/src/pkcs7.c +@@ -2107,6 +2107,11 @@ static int wc_PKCS7_BuildSignedAttributes(wc_PKCS7* pkcs7, ESD* esd, + + /* add custom signed attributes if set */ + if (pkcs7->signedAttribsSz > 0 && pkcs7->signedAttribs != NULL) { ++ word32 availableSpace = MAX_SIGNED_ATTRIBS_SZ - atrIdx; ++ ++ if (pkcs7->signedAttribsSz > availableSpace) ++ return BUFFER_E; ++ + esd->signedAttribsCount += pkcs7->signedAttribsSz; + esd->signedAttribsSz += (word32)EncodeAttributes( + &esd->signedAttribs[atrIdx], (int)esd->signedAttribsCount, diff --git a/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.8.0.bb b/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.8.0.bb index 78d17630c7..e9be766e67 100644 --- a/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.8.0.bb +++ b/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.8.0.bb @@ -27,6 +27,7 @@ SRC_URI = " \ file://CVE-2025-7394-4.patch \ file://CVE-2025-7394-5.patch \ file://CVE-2025-7394-6.patch \ + file://CVE-2026-0819.patch \ " SRCREV = "b077c81eb635392e694ccedbab8b644297ec0285"