Timeout Bug in openvpn-auth-ldap Package causing OpenVPN to Crash
Aaron Peschel
apeschel at foxpass.com
Tue Jul 12 23:34:38 UTC 2016
Hello,
There is a timeout bug in the openvpn-auth-ldap package that causes
OpenVPN to crash when the network timeout is exceeded.
You can see this bug referenced here:
https://github.com/threerings/openvpn-auth-ldap/issues/11
And the fix mentioned here:
https://github.com/threerings/openvpn-auth-ldap/pull/53
The patch is not compatible with the source provided with 14.04, so I
have updated the patch to work with the 14.04 source. I have provided
it below.
I would appreciate if a package with the fix could be released.
Thank you,
-Aaron Peschel
Index: openvpn-auth-ldap/src/LFLDAPConnection.m
===================================================================
--- openvpn-auth-ldap.orig/src/LFLDAPConnection.m 2016-07-12
23:24:14.710216000 +0000
+++ openvpn-auth-ldap/src/LFLDAPConnection.m 2016-07-12
23:24:48.394216000 +0000
@@ -175,7 +175,7 @@
/* Wait for the result */
timeout.tv_sec = _timeout;
timeout.tv_usec = 0;
- if (ldap_result(ldapConn, msgid, 1, &timeout, &res) == -1) {
+ if (ldap_result(ldapConn, msgid, 1, &timeout, &res) <= 0) {
err = ldap_get_errno(ldapConn);
if (err == LDAP_TIMEOUT)
ldap_abandon_ext(ldapConn, msgid, NULL, NULL);
@@ -383,7 +383,7 @@
}
/* Wait for the result */
- if (ldap_result(ldapConn, msgid, 1, &timeout, &res) == -1) {
+ if (ldap_result(ldapConn, msgid, 1, &timeout, &res) <= 0) {
err = ldap_get_errno(ldapConn);
if (err == LDAP_TIMEOUT)
ldap_abandon_ext(ldapConn, msgid, NULL, NULL);
More information about the Ubuntu-devel-discuss
mailing list