[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#7712) Lock ordering problem in libldap/abandon.c

Full_Name: Emily Backes
Version: RE24/HEAD
OS: any
Submission from: (NULL) (

libldap has a lock ordering problem in do_abandon in libldap/abandon.c;
do_abandon always runs in locked req_mutex context, but one of the cases
acquires conn_mutex for the ldap_free_connection() call.

The function is always called with that mutex held, but has several non-local
exits and other difficulties with refactoring the problem away, so the clearest
solutions seems to be dropping and retrieving the req_mutex while messing with
the conn_mutex.

Patch incoming.