Package: openvpn
Version: 2.3.2-9
Severity: important
Control: forwarded -1 [email protected]

Hello,

Our openvpn server got out of free inodes in /tmp, making it quite
completely nonworking.  This is due to some codepath in multi.c which
does not remove its temporary file (when a plugin callback returns an
error, or a client-connect script returns an error).  Please see the
attached patch which fixes this.

Samuel

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'buildd-unstable'), (500, 'unstable'), 
(500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.17.0 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages openvpn depends on:
ii  cdebconf [debconf-2.0]  0.192
ii  debconf [debconf-2.0]   1.5.53
ii  initscripts             2.88dsf-53.4
ii  iproute2                3.16.0-2
ii  libc6                   2.19-11
ii  liblzo2-2               2.08-1
ii  libpam0g                1.1.8-3.1
ii  libpkcs11-helper1       1.11-2
ii  libssl1.0.0             1.0.1i-2

Versions of packages openvpn recommends:
ii  easy-rsa  2.2.2-1

Versions of packages openvpn suggests:
ii  openssl     1.0.1i-2
ii  resolvconf  1.75

-- debconf information excluded

-- 
Samuel
Progress (n.): The process through which the Internet has evolved from
smart people in front of dumb terminals to dumb people in front of smart
terminals.
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -1692,6 +1692,9 @@ multi_connection_established (struct mul
            {
              msg (M_WARN, "WARNING: client-connect plugin call failed");
              cc_succeeded = false;
+             if (!platform_unlink (dc_file))
+               msg (D_MULTI_ERRORS, "MULTI: problem deleting temporary file: 
%s",
+                    dc_file);
            }
          else
            {
@@ -1750,7 +1753,12 @@ multi_connection_established (struct mul
              ++cc_succeeded_count;
            }
          else
-           cc_succeeded = false;
+           {
+             cc_succeeded = false;
+             if (!platform_unlink (dc_file))
+               msg (D_MULTI_ERRORS, "MULTI: problem deleting temporary file: 
%s",
+                    dc_file);
+           }
         script_failed:
          argv_reset (&argv);
        }

Reply via email to