[gnutls-devel] GnuTLS | Dereference of null at privkey.c (gnutls version - 3.8.3) (#1579)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Thu Sep 12 21:22:42 CEST 2024
David Meliksetyan created an issue: https://gitlab.com/gnutls/gnutls/-/issues/1579
## Potential problem
By defining `p` in **/lib/privkey.c**, we dereference the `privkey` pointer. https://gitlab.com/gnutls/gnutls/-/blob/3.8.3/lib/privkey.c#L1922
At the same time there is a check that `privkey` is not `NULL`, but it is located after the dereference. This carries the risk of null dereferencing. https://gitlab.com/gnutls/gnutls/-/blob/3.8.3/lib/privkey.c#L1924-1927
## Possible solution
If I correctly assumed this as a mistake, to fix it, it will be enough to replace the dereference line and the check in places.
Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author D. Meliksetyan.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1579
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/20240912/431ecde9/attachment-0001.html>
More information about the Gnutls-devel
mailing list