]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: auth/threads: use of crypt() is not thread-safe
authorWilly Tarreau <w@1wt.eu>
Mon, 29 Oct 2018 17:02:54 +0000 (18:02 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 29 Oct 2018 17:06:02 +0000 (18:06 +0100)
commit34d4b525a129baa6f52a930ae629ddb1ba4255c2
tree250635db12bb89a7b3f63441753cab6462cb54b5
parent744de5b52ad1ade82205b27aa9421f5ac88f84cf
BUG/MEDIUM: auth/threads: use of crypt() is not thread-safe

It was reported here that authentication may fail when threads are
enabled :

    https://bugzilla.redhat.com/show_bug.cgi?id=1643941

While I couldn't reproduce the issue, it's obvious that there is a
problem with the use of the non-reentrant crypt() function there.
On Linux systems there's crypt_r() but not on the vast majority of
other ones. Thus a first approach consists in placing a lock around
this crypt() call. Another patch may relax it when crypt_r() is
available.

This fix must be backported to 1.8. Thanks to Ryan O'Hara for the
quick notification.
include/common/hathreads.h
src/auth.c