Ankur Tyagi c49bff1273
wolfssl: patch CVE-2025-7394
Details: https://nvd.nist.gov/vuln/detail/CVE-2025-7394

Backport patches from the PR[1][2][3] mentioned in the changelog[4].

[1] https://github.com/wolfSSL/wolfssl/pull/8849
[2] https://github.com/wolfSSL/wolfssl/pull/8867
[3] https://github.com/wolfSSL/wolfssl/pull/8898
[4] 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>
2026-01-12 08:12:18 +05:30

41 lines
1.1 KiB
Diff

From 670437d91ae3025b4721eb4f450e5dc31fc3d6ee Mon Sep 17 00:00:00 2001
From: Chris Conlon <chris@wolfssl.com>
Date: Wed, 18 Jun 2025 16:08:34 -0600
Subject: [PATCH] Add HAVE_GETPID to options.h if getpid detected, needed for
apps to correctly detect size of WC_RNG struct
CVE: CVE-2025-7394
Upstream-Status: Backport [https://github.com/wolfSSL/wolfssl/commit/9c35c0de65e135e621400958f22829c0d2555ed4]
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
---
configure.ac | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/configure.ac b/configure.ac
index 43ddd4767..636c45aef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -156,6 +156,9 @@ fi
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+#endif
]])
AC_PROG_INSTALL
@@ -9479,6 +9482,12 @@ then
AM_CFLAGS="$AM_CFLAGS -DHAVE___UINT128_T=1"
fi
+# Add HAVE_GETPID to AM_CFLAGS for inclusion in options.h
+if test "$ac_cv_func_getpid" = "yes"
+then
+ AM_CFLAGS="$AM_CFLAGS -DHAVE_GETPID=1"
+fi
+
LIB_SOCKET_NSL
AX_HARDEN_CC_COMPILER_FLAGS