---
src/iwd.h | 9 +++++++++
1 file changed, 9 insertions(+)
v2:
- Renamed to IWD_MAX_PASSWORD_LEN
diff --git a/src/iwd.h b/src/iwd.h
index 22223526..426af743 100644
--- a/src/iwd.h
+++ b/src/iwd.h
@@ -22,6 +22,15 @@
#define uninitialized_var(x) x = x
+/*
+ * Set a maximum to prevent sending too much data to the kernel when hashing
+ * the passphrase (or any other crypto operations involving the passphrase).
+ * This will also prevent potential stack overflows if the passphrase is put
+ * into EAP packets on the stack (EAP-GTC). This value is not tied to IEEE or
+ * any RFC's, just chosen to be long enough to not restrict a normal user.
+ */
+#define IWD_MAX_PASSWORD_LEN 2048
+
struct l_genl;
struct l_genl_family;
--
2.17.1