From 301d8473dfbc994af293a000d1ddf10fba6f4d28 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Fri, 6 Mar 2020 11:16:26 -0800 Subject: [PATCH] iwd: define a maximum password length --- src/iwd.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/iwd.h b/src/iwd.h index 22223526..8b63aa7d 100644 --- a/src/iwd.h +++ b/src/iwd.h @@ -22,6 +22,13 @@ #define uninitialized_var(x) x = x +/* + * Set a maximum to prevent sending too much data to the kernel when hashing + * the password (or any other crypto operations involving the password). + * This value is not tied to IEEE or any RFC's, just chosen to be long enough + */ +#define IWD_MAX_PASSWORD_LEN 2048 + struct l_genl; struct l_genl_family;