[gnutls-devel] Possible dereferencing error on pthread mutexes in 3.6.0
Nikos Mavrogiannopoulos
n.mavrogiannopoulos at gmail.com
Sat Sep 30 15:01:06 CEST 2017
On Fri, 2017-09-29 at 20:47 +0200, Svein Olav Bjerkeset wrote:
> Hi,
>
> During an attempt to build libmicrohttpd on RHEL5, I tried a
> combination
> of libmicrohttpd-0.9.55 and GnuTLS 3.6.0. It consistantly core
> dumped
> with a segfault when trying to increment at mutex value
> (gnutls_atomic_uint_st) during https connections. The increment
> occurs
> at lib/priority.c:563:
>
> gnutls_atomic_increment(&priority->usage_cnt);
>
> Running the test https server through gdb, I find that the reason
> for
> the crash, is that pthread_mutex_lock is eventually called with a
> null
> pointer argument from gnutls_system_mutex_lock.
>
> Debuging seems to show that the mutex initialization works as
> intended,
> but not lock and unlock.
Thank you. That seems to be the same case as the issue fixed by the
following merge request:
https://gitlab.com/gnutls/gnutls/merge_requests/491
It is triggered on older systems without atomic integers. The fix will
be included in the 3.6.1 release.
regards,
Nikos
More information about the Gnutls-devel
mailing list