[gnutls-devel] GnuTLS | Increase the limit of TLS PSK usernames (!1581)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Mon Jun 27 10:47:49 CEST 2022
Merge request https://gitlab.com/gnutls/gnutls/-/merge_requests/1581 was reviewed by Daiki Ueno
--
<!-- Get preloaded note discussion-->
Daiki Ueno started a new discussion on lib/auth/rsa_psk.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1581#note_1006304012
> + if (ret < 0) {
> + gnutls_assert();
> + goto cleanup;
Maybe you could simply return here as no cleanup is needed? On the other hand, the code below might need to free `info->username` upon failure, or is it handled separately?
--
<!-- Get preloaded note discussion-->
Daiki Ueno started a new discussion on lib/auth/srp_kx.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1581#note_1006304022
> + if (info->username == NULL)
> + return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR);
> + _gnutls_str_cpy(info->username, username_length + 1, priv->username);
```suggestion:-3+0
info->username = gnutls_strdup(priv->username);
if (info->username == NULL)
return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR);
```
--
<!-- Get preloaded note discussion-->
Daiki Ueno started a new discussion on lib/session_pack.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1581#note_1006304024
> - return GNUTLS_E_INTERNAL_ERROR;
> - }
> + if (username_size > MAX_USERNAME_SIZE)
I'm a bit confused: does this `username_size` account for the terminating NULL or not? If yes shouldn't this condition be `username_size > MAX_USERNAME_SIZE + 1`?
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1581
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20220627/b0e5b15d/attachment-0001.html>
More information about the Gnutls-devel
mailing list