[gnutls-devel] GnuTLS | gnutls_buffer_append_data: avoid use-after-free in the callers (!1399)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Tue Mar 9 18:13:56 CET 2021




Daiki Ueno commented on a discussion on lib/ext/key_share.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1399#note_525422352

>  		if (!have_creds_for_tls13(session))
>  			return 0;
>  
> -		/* write the total length later */
> -		lengthp = &extdata->data[extdata->length];
> +		length_pos = extdata->length;
>  
>  		ret =
>  		    _gnutls_buffer_append_prefix(extdata, 16, 0);

Yes, the extension itself has a 2-byte length field, which we are adding here (with 0 as the content).

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1399#note_525422352
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/20210309/08e0fd94/attachment.html>


More information about the Gnutls-devel mailing list