On Fri, 2020-03-06 at 12:27 -0600, Denis Kenzior wrote:
Hi James,
On 3/6/20 11:48 AM, James Prestwood wrote:
> ---
> src/agent.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/agent.c b/src/agent.c
> index d213f3cd..44039a89 100644
> --- a/src/agent.c
> +++ b/src/agent.c
> @@ -159,6 +159,9 @@ static void passphrase_reply(struct
> l_dbus_message *reply,
> if (!l_dbus_message_get_arguments(reply, "s", &passphrase))
> goto done;
>
> + if (strlen(passphrase) > IWD_MAX_PASSPHRASE_LEN)
> + goto done;
> +
This callback is used for three things from what I remember:
1. The passphrase for decrypting private keys
2. The passphrase for PSK networks.
3. The password for EAP methods.
This checking should only apply to 3, no?
Well, we should probably have a maximum on all three... The private key
passphrase is sent to the kernel, so we probably don't want that to be
huge seems like we could put the same limitation on both 1 and 3. In
addition for PSK passphrases we should probably enforce 8-63 byte
lengths if we don't already somewhere else.
> result = AGENT_RESULT_OK;
>
> done:
> @@ -181,6 +184,9 @@ static void user_name_passwd_reply(struct
> l_dbus_message *reply,
> if (!l_dbus_message_get_arguments(reply, "ss", &username,
> &passwd))
> goto done;
>
> + if (strlen(passwd) > IWD_MAX_PASSPHRASE_LEN)
> + goto done;
> +
> result = AGENT_RESULT_OK;
>
> done:
>
Regards,
-Denis
_______________________________________________
iwd mailing list -- iwd(a)lists.01.org
To unsubscribe send an email to iwd-leave(a)lists.01.org