aports/main/openssl/auxv.patch
Achill Gilgenast 81040d484e main/openssl: security upgrade to 3.5.5
https://github.com/openssl/openssl/releases/tag/openssl-3.5.5

- CVE-2025-11187
- CVE-2025-15467
- CVE-2025-15468
- CVE-2025-15469
- CVE-2025-66199
- CVE-2025-68160
- CVE-2025-69418
- CVE-2025-69419
- CVE-2025-69420
- CVE-2025-69421
- CVE-2026-22795
- CVE-2026-22796
2026-01-27 17:30:14 +01:00

67 lines
2.0 KiB
Diff

this should not be glibc guarded, as this auxv fallback always works on linux
this makes libcrypto use the auxv for cpu feature detection instead of falling
back on the sigill trapping method on these arches
--
--- a/crypto/armcap.c
+++ b/crypto/armcap.c
@@ -66,11 +66,9 @@ uint32_t OPENSSL_rdtsc(void)
void OPENSSL_cpuid_setup(void) __attribute__((constructor));
#endif
-#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
-#if __GLIBC_PREREQ(2, 16)
+#if 1
#include <sys/auxv.h>
#define OSSL_IMPLEMENT_GETAUXVAL
-#endif
#elif defined(__ANDROID_API__)
/* see https://developer.android.google.cn/ndk/guides/cpu-features */
#if __ANDROID_API__ >= 18
--- a/crypto/ppccap.c
+++ b/crypto/ppccap.c
@@ -86,18 +86,8 @@ size_t OPENSSL_instrument_bus2(unsigned int *out, size_t cnt, size_t max)
return 0;
}
-#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
-#if __GLIBC_PREREQ(2, 16)
#include <sys/auxv.h>
#define OSSL_IMPLEMENT_GETAUXVAL
-#elif defined(__ANDROID_API__)
-/* see https://developer.android.google.cn/ndk/guides/cpu-features */
-#if __ANDROID_API__ >= 18
-#include <sys/auxv.h>
-#define OSSL_IMPLEMENT_GETAUXVAL
-#endif
-#endif
-#endif
#if defined(__FreeBSD__) || defined(__OpenBSD__)
#include <sys/param.h>
--- a/crypto/s390xcap.c
+++ b/crypto/s390xcap.c
@@ -25,10 +25,10 @@
#include <unistd.h>
#endif
-#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
-#if __GLIBC_PREREQ(2, 16)
+#if 1
+#if 1
#include <sys/auxv.h>
-#if defined(HWCAP_S390_STFLE) && defined(HWCAP_S390_VX)
+#if defined(HWCAP_S390_STFLE) && defined(HWCAP_S390_VXRS)
#define OSSL_IMPLEMENT_GETAUXVAL
#endif
#endif
@@ -133,7 +133,7 @@ void OPENSSL_cpuid_setup(void)
OPENSSL_s390x_facilities();
/* protection against disabled vector facility */
- if (!(hwcap & HWCAP_S390_VX)) {
+ if (!(hwcap & HWCAP_S390_VXRS)) {
OPENSSL_s390xcap_P.stfle[2] &= ~(S390X_CAPBIT(S390X_VX)
| S390X_CAPBIT(S390X_VXD)
| S390X_CAPBIT(S390X_VXE));