forked from pool/wpa_supplicant
- update to 2.10.0: * SAE changes - improved protection against side channel attacks [https://w1.fi/security/2022-1/] - added support for the hash-to-element mechanism (sae_pwe=1 or sae_pwe=2); this is currently disabled by default, but will likely get enabled by default in the future - fixed PMKSA caching with OKC - added support for SAE-PK * EAP-pwd changes - improved protection against side channel attacks [https://w1.fi/security/2022-1/] * fixed P2P provision discovery processing of a specially constructed invalid frame [https://w1.fi/security/2021-1/] * fixed P2P group information processing of a specially constructed invalid frame [https://w1.fi/security/2020-2/] * fixed PMF disconnection protection bypass in AP mode [https://w1.fi/security/2019-7/] * added support for using OpenSSL 3.0 * increased the maximum number of EAP message exchanges (mainly to support cases with very large certificates) * fixed various issues in experimental support for EAP-TEAP peer * added support for DPP release 2 (Wi-Fi Device Provisioning Protocol) * a number of MKA/MACsec fixes and extensions * added support for SAE (WPA3-Personal) AP mode configuration * added P2P support for EDMG (IEEE 802.11ay) channels * fixed EAP-FAST peer with TLS GCM/CCM ciphers * improved throughput estimation and BSS selection OBS-URL: https://build.opensuse.org/request/show/948384 OBS-URL: https://build.opensuse.org/package/show/hardware/wpa_supplicant?expand=0&rev=130
47 lines
1.0 KiB
Diff
47 lines
1.0 KiB
Diff
Index: wpa_supplicant-2.10/src/utils/os_unix.c
|
|
===================================================================
|
|
--- wpa_supplicant-2.10.orig/src/utils/os_unix.c
|
|
+++ wpa_supplicant-2.10/src/utils/os_unix.c
|
|
@@ -6,11 +6,15 @@
|
|
* See README for more details.
|
|
*/
|
|
|
|
+#ifndef _GNU_SOURCE
|
|
+#define _GNU_SOURCE
|
|
+#endif
|
|
#include "includes.h"
|
|
|
|
#include <time.h>
|
|
#include <sys/wait.h>
|
|
-
|
|
+#include <sys/syscall.h>
|
|
+#include <unistd.h>
|
|
#ifdef ANDROID
|
|
#include <sys/capability.h>
|
|
#include <sys/prctl.h>
|
|
@@ -263,6 +267,10 @@ int os_get_random(unsigned char *buf, si
|
|
buf[i] = i & 0xff;
|
|
return 0;
|
|
#else /* TEST_FUZZ */
|
|
+#ifdef SYS_getrandom
|
|
+ int gr = TEMP_FAILURE_RETRY(syscall(SYS_getrandom, buf, len, 0));
|
|
+ return (gr != -1 && gr == len) ? 0 : -1;
|
|
+#else /* SYS_getrandom */
|
|
FILE *f;
|
|
size_t rc;
|
|
|
|
@@ -275,10 +283,13 @@ int os_get_random(unsigned char *buf, si
|
|
return -1;
|
|
}
|
|
|
|
+ setbuf(f, NULL);
|
|
+
|
|
rc = fread(buf, 1, len, f);
|
|
fclose(f);
|
|
|
|
return rc != len ? -1 : 0;
|
|
+#endif /* SYS_getrandom */
|
|
#endif /* TEST_FUZZ */
|
|
}
|
|
|