Red Hat Bugzilla – Bug 507903
m2crypto's OpenSSL locking callback does a sem_trywait() instead of sem_wait ()
Last modified: 2010-03-14 17:29:30 EDT
Created attachment 349275 [details]
threading_locking_callback() in m2crypto does not block on a lock when the lock is held by another thread.
Compile the test case with
gcc m2crypto-threading-test.c -ldl $(pkg-config --cflags --libs openssl)
(adjusting for your M2Crypto module path). The program should block after printing "lock 3" (when attempting to lock an already locked lock), but it doesn't.
Created attachment 349276 [details]
Patch against upstream svn
Release note added. If any revisions are required, please set the
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.
the OpenSSL locking callback in M2Crypto did not block on a lock when the lock was held by another thread. This could cause data corruption in multi-threaded applications. The locking callback now functions correctly, regardless of which thread holds the lock.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.