summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnkur Tyagi <ankur.tyagi85@gmail.com>2026-02-25 07:54:11 +1300
committerAnuj Mittal <anuj.mittal@oss.qualcomm.com>2026-03-06 10:09:05 +0530
commit4243e66245917ddbc77fb4e1315a4bcf2859562d (patch)
treee7c676eddaa3bb9051bef635e6eaa436a3b41a0a
parent6781da83ae3e6b73d38df05fb1955ce9608ffe5f (diff)
downloadmeta-openembedded-4243e66245917ddbc77fb4e1315a4bcf2859562d.tar.gz
wolfssl: patch CVE-2025-7395
Details: https://nvd.nist.gov/vuln/detail/CVE-2025-7395 Backport patches from the PR[1] mentioned in the changelog[2] [1] github.com/wolfSSL/wolfssl/pull/8833 [2] https://github.com/wolfSSL/wolfssl/blob/master/ChangeLog.md#wolfssl-release-582-july-17-2025 Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
-rw-r--r--meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-1.patch85
-rw-r--r--meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-2.patch28
-rw-r--r--meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-3.patch26
-rw-r--r--meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-4.patch27
-rw-r--r--meta-networking/recipes-connectivity/wolfssl/wolfssl_5.8.0.bb4
5 files changed, 170 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-1.patch b/meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-1.patch
new file mode 100644
index 0000000000..576d261dc3
--- /dev/null
+++ b/meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-1.patch
@@ -0,0 +1,85 @@
1From 420f3390c4922febaf54d02a81da1fdab0ad5f04 Mon Sep 17 00:00:00 2001
2From: Ruby Martin <ruby@wolfssl.com>
3Date: Mon, 2 Jun 2025 16:38:32 -0600
4Subject: [PATCH] create policy for WOLFSSL_APPLE_NATIVE_CERT_VALIDATION,
5 domain name checking
6
7CVE: CVE-2025-7395
8Upstream-Status: Backport [https://github.com/wolfSSL/wolfssl/commit/9864959e41bd9259f258c09171ae2ec1c43fbc7f]
9(cherry picked from commit 9864959e41bd9259f258c09171ae2ec1c43fbc7f)
10Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
11---
12 src/internal.c | 25 ++++++++++++++++++++-----
13 1 file changed, 20 insertions(+), 5 deletions(-)
14
15diff --git a/src/internal.c b/src/internal.c
16index 6b3a227bc..1b9a469ee 100644
17--- a/src/internal.c
18+++ b/src/internal.c
19@@ -211,7 +211,7 @@ int writeAeadAuthData(WOLFSSL* ssl, word16 sz, byte type, byte* additional,
20 #include <Security/SecCertificate.h>
21 #include <Security/SecTrust.h>
22 #include <Security/SecPolicy.h>
23-static int DoAppleNativeCertValidation(const WOLFSSL_BUFFER_INFO* certs,
24+static int DoAppleNativeCertValidation(WOLFSSL* ssl, const WOLFSSL_BUFFER_INFO* certs,
25 int totalCerts);
26 #endif /* #if defined(__APPLE__) && defined(WOLFSSL_SYS_CA_CERTS) */
27
28@@ -16775,7 +16775,7 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
29 * into wolfSSL, try to validate against the system certificates
30 * using Apple's native trust APIs */
31 if ((ret != 0) && (ssl->ctx->doAppleNativeCertValidationFlag)) {
32- if (DoAppleNativeCertValidation(args->certs,
33+ if (DoAppleNativeCertValidation(ssl, args->certs,
34 args->totalCerts)) {
35 WOLFSSL_MSG("Apple native cert chain validation SUCCESS");
36 ret = 0;
37@@ -42665,7 +42665,8 @@ cleanup:
38 * wolfSSL's built-in certificate validation mechanisms anymore. We instead
39 * must call into the Security Framework APIs to authenticate peer certificates
40 */
41-static int DoAppleNativeCertValidation(const WOLFSSL_BUFFER_INFO* certs,
42+static int DoAppleNativeCertValidation(WOLFSSL* ssl,
43+ const WOLFSSL_BUFFER_INFO* certs,
44 int totalCerts)
45 {
46 int i;
47@@ -42674,7 +42675,8 @@ static int DoAppleNativeCertValidation(const WOLFSSL_BUFFER_INFO* certs,
48 CFMutableArrayRef certArray = NULL;
49 SecCertificateRef secCert = NULL;
50 SecTrustRef trust = NULL;
51- SecPolicyRef policy = NULL ;
52+ SecPolicyRef policy = NULL;
53+ CFStringRef hostname = NULL;
54
55 WOLFSSL_ENTER("DoAppleNativeCertValidation");
56
57@@ -42703,7 +42705,17 @@ static int DoAppleNativeCertValidation(const WOLFSSL_BUFFER_INFO* certs,
58 }
59
60 /* Create trust object for SecCertifiate Ref */
61- policy = SecPolicyCreateSSL(true, NULL);
62+ if (ssl->buffers.domainName.buffer &&
63+ ssl->buffers.domainName.length > 0) {
64+ /* Create policy with specified value to require host name match */
65+ hostname = CFStringCreateWithCString(kCFAllocatorDefault,
66+ (const char*)ssl->buffers.domainName.buffer, kCFStringEncodingUTF8);
67+ }
68+ if (hostname != NULL) {
69+ policy = SecPolicyCreateSSL(true, hostname);
70+ } else {
71+ policy = SecPolicyCreateSSL(true, NULL);
72+ }
73 status = SecTrustCreateWithCertificates(certArray, policy, &trust);
74 if (status != errSecSuccess) {
75 WOLFSSL_MSG_EX("Error creating trust object, "
76@@ -42734,6 +42746,9 @@ cleanup:
77 if (policy) {
78 CFRelease(policy);
79 }
80+ if (hostname) {
81+ CFRelease(hostname);
82+ }
83
84 WOLFSSL_LEAVE("DoAppleNativeCertValidation", ret);
85
diff --git a/meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-2.patch b/meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-2.patch
new file mode 100644
index 0000000000..223b6d52a0
--- /dev/null
+++ b/meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-2.patch
@@ -0,0 +1,28 @@
1From 7867076975aa84ebaed4001fae1ebffd013322d5 Mon Sep 17 00:00:00 2001
2From: Brett <bigbrett@users.noreply.github.com>
3Date: Wed, 4 Jun 2025 15:48:15 -0600
4Subject: [PATCH] prevent apple native cert validation from overriding error
5 codes other than ASN_NO_SIGNER_E
6
7CVE: CVE-2025-7395
8Upstream-Status: Backport [https://github.com/wolfSSL/wolfssl/commit/bc8eeea703253bd65d472a9541b54fef326e8050]
9(cherry picked from commit bc8eeea703253bd65d472a9541b54fef326e8050)
10Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
11---
12 src/internal.c | 3 ++-
13 1 file changed, 2 insertions(+), 1 deletion(-)
14
15diff --git a/src/internal.c b/src/internal.c
16index 1b9a469ee..6a76eb130 100644
17--- a/src/internal.c
18+++ b/src/internal.c
19@@ -16774,7 +16774,8 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
20 /* If we can't validate the peer cert chain against the CAs loaded
21 * into wolfSSL, try to validate against the system certificates
22 * using Apple's native trust APIs */
23- if ((ret != 0) && (ssl->ctx->doAppleNativeCertValidationFlag)) {
24+ if ((ret == ASN_NO_SIGNER_E) &&
25+ (ssl->ctx->doAppleNativeCertValidationFlag)) {
26 if (DoAppleNativeCertValidation(ssl, args->certs,
27 args->totalCerts)) {
28 WOLFSSL_MSG("Apple native cert chain validation SUCCESS");
diff --git a/meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-3.patch b/meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-3.patch
new file mode 100644
index 0000000000..f786656765
--- /dev/null
+++ b/meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-3.patch
@@ -0,0 +1,26 @@
1From 70302af2c21a121845e1e721ed27b3b106f186f6 Mon Sep 17 00:00:00 2001
2From: Brett <bigbrett@users.noreply.github.com>
3Date: Wed, 4 Jun 2025 16:56:16 -0600
4Subject: [PATCH] add missing error trace macro
5
6CVE: CVE-2025-7395
7Upstream-Status: Backport [https://github.com/wolfSSL/wolfssl/commit/0e2a3fd0b64bc6ba633aa9227e92ecacb42b5b1b]
8(cherry picked from commit 0e2a3fd0b64bc6ba633aa9227e92ecacb42b5b1b)
9Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
10---
11 src/internal.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/src/internal.c b/src/internal.c
15index 6a76eb130..1d01ee095 100644
16--- a/src/internal.c
17+++ b/src/internal.c
18@@ -16774,7 +16774,7 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
19 /* If we can't validate the peer cert chain against the CAs loaded
20 * into wolfSSL, try to validate against the system certificates
21 * using Apple's native trust APIs */
22- if ((ret == ASN_NO_SIGNER_E) &&
23+ if ((ret == WC_NO_ERR_TRACE(ASN_NO_SIGNER_E)) &&
24 (ssl->ctx->doAppleNativeCertValidationFlag)) {
25 if (DoAppleNativeCertValidation(ssl, args->certs,
26 args->totalCerts)) {
diff --git a/meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-4.patch b/meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-4.patch
new file mode 100644
index 0000000000..8af431f938
--- /dev/null
+++ b/meta-networking/recipes-connectivity/wolfssl/files/CVE-2025-7395-4.patch
@@ -0,0 +1,27 @@
1From 71d4cb57ceada7830457938787583c2aa6ba3555 Mon Sep 17 00:00:00 2001
2From: Brett <bigbrett@users.noreply.github.com>
3Date: Wed, 4 Jun 2025 18:29:05 -0600
4Subject: [PATCH] formatting
5
6CVE: CVE-2025-7395
7Upstream-Status: Backport [https://github.com/wolfSSL/wolfssl/commit/89be92f1a8b255d85c0d8bfb8849571d259c199c]
8(cherry picked from commit 89be92f1a8b255d85c0d8bfb8849571d259c199c)
9Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
10---
11 src/internal.c | 3 ++-
12 1 file changed, 2 insertions(+), 1 deletion(-)
13
14diff --git a/src/internal.c b/src/internal.c
15index 1d01ee095..992c10d2c 100644
16--- a/src/internal.c
17+++ b/src/internal.c
18@@ -42710,7 +42710,8 @@ static int DoAppleNativeCertValidation(WOLFSSL* ssl,
19 ssl->buffers.domainName.length > 0) {
20 /* Create policy with specified value to require host name match */
21 hostname = CFStringCreateWithCString(kCFAllocatorDefault,
22- (const char*)ssl->buffers.domainName.buffer, kCFStringEncodingUTF8);
23+ (const char*)ssl->buffers.domainName.buffer,
24+ kCFStringEncodingUTF8);
25 }
26 if (hostname != NULL) {
27 policy = SecPolicyCreateSSL(true, hostname);
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 9cd7c07ad2..4f323ec128 100644
--- a/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.8.0.bb
+++ b/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.8.0.bb
@@ -17,6 +17,10 @@ SRC_URI = " \
17 file://0001-wolfssl-wolfcrypt-logging.h-and-wolfcrypt-src-loggin.patch \ 17 file://0001-wolfssl-wolfcrypt-logging.h-and-wolfcrypt-src-loggin.patch \
18 file://run-ptest \ 18 file://run-ptest \
19 file://CVE-2025-13912.patch \ 19 file://CVE-2025-13912.patch \
20 file://CVE-2025-7395-1.patch \
21 file://CVE-2025-7395-2.patch \
22 file://CVE-2025-7395-3.patch \
23 file://CVE-2025-7395-4.patch \
20" 24"
21 25
22SRCREV = "b077c81eb635392e694ccedbab8b644297ec0285" 26SRCREV = "b077c81eb635392e694ccedbab8b644297ec0285"