[gnutls-devel] GnuTLS | Draft: AES-GCM buffer size checks, accelerated implementations and ASAN (!1521)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Tue Jan 25 15:29:52 CET 2022




Alexander Sosedkin started a new discussion on lib/accelerated/afalg.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1521#note_821053031

>  		return gnutls_assert_val(GNUTLS_E_ENCRYPTION_FAILED);
>  	}
>  
> +	if (unlikely(dst_size < src_size))
> +		return gnutls_assert_val(GNUTLS_E_SHORT_MEMORY_BUFFER);
> +
>  	iov.iov_base = (void *)dst;
> -	iov.iov_len = (src_size > dst_size) ? dst_size : src_size;
> +	iov.iov_len = src_size;

Here's a place (+ analogous one in `
decrypt`) that I really don't understand, so I'd like to flag it for reviewer's attention with this comment.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1521#note_821053031
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/20220125/4b5974ff/attachment-0001.html>


More information about the Gnutls-devel mailing list