[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
Thu Jul 7 14:57:34 CEST 2022




Zoltán Fridrich commented on a discussion on lib/session_pack.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1581#note_1019201474

>  		return GNUTLS_E_INVALID_REQUEST;
>  
>  	BUFFER_POP_NUM(ps, username_size);
> -	if (username_size > (sizeof(info->username) - 1)) {
> -		gnutls_assert();
> -		return GNUTLS_E_INTERNAL_ERROR;
> -	}
> +	if (username_size > MAX_USERNAME_SIZE)

`username_size` does not account for the terminating NULL here and `MAX_USERNAME_SIZE` does not either, therefore `username_size > MAX_USERNAME_SIZE` is correct.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1581#note_1019201474
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/20220707/acf2d9ac/attachment.html>


More information about the Gnutls-devel mailing list