[gnutls-devel] GnuTLS | Fix memleak in 'iov_store_grow' (!1277)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Fri Jun 5 02:30:14 CEST 2020



Alexander Haase created a merge request: https://gitlab.com/gnutls/gnutls/-/merge_requests/1277

Project:Branches: ahaase/gnutls:fix/memleak to gnutls/gnutls:master
Author:    Alexander Haase



This patch is related to issue #1017 and fixes a bug in `iov_store_grow()` to avoid a memory leak for use with Samba and `AES-CCM` cipher.

Under certain conditions memory is not freed after use, as the `allocated` flag is unset. In use with Samba, this can lead to a DoS attack, as copying a sufficiently large amount of data would allocate the whole memory of the server and letting the process die. As far as I could test, this patch allows the memory to be freed up again, having a stable memory consumption when using `gnutls_aead_cipher_decryptv2()`.

## Checklist
 * [x] Commits have `Signed-off-by:` with name/author being identical to the commit author
 * [ ] Code modified for feature
 * [ ] Test suite updated with functionality tests
 * [ ] Test suite updated with negative tests
 * [ ] Documentation updated / NEWS entry present (for non-trivial changes)
 * [ ] CI timeout is 2h or higher (see Settings/CICD/General pipelines/Timeout)

## Reviewer's checklist:
 * [ ] Any issues marked for closing are addressed
 * [ ] There is a test suite reasonably covering new functionality or modifications
 * [ ] Function naming, parameters, return values, types, etc., are consistent and according to `CONTRIBUTION.md`
 * [ ] This feature/change has adequate documentation added
 * [ ] No obvious mistakes in the code

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1277
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/20200605/545b9dd3/attachment.html>


More information about the Gnutls-devel mailing list