CVE-2013-4159: High severity Ctdb Project Ctdb vulnerability
ctdb before 2.3 in OpenSUSE 12.3 and 13.1 does not create temporary files securely, which has unspecified impact related to "several temp file vulnerabilities" in (1) tcp/tcpconnect.c, (2) server/eventscript.c, (3) tools/ctdbdiagnostics, (4) config/gdbbacktrace, and (5) include/ctdbprivate.h.
Other sources
Kurt Seifried (kseifried) reports:
While looking at various components for Storage I ran across some tmp file issues in ctdb:
======================================== ./ctdb-1.0.114.5/tcp/tcpconnect.c: const char lockpath = "/tmp/.ctdbsocketlock"; const char lockpath = "/tmp/.ctdbsocketlock"; struct flock lock; int one = 1; int socksize;
/ in order to ensure that we don't get two nodes with the same adddress, we must make the bind() and listen() calls atomic. The SOREUSEADDR setsockopt only prevents double binds if the first socket is in LISTEN state / lockfd = open(lockpath, ORDWR|OCREAT, 0666); if (lockfd == -1) { DEBUG(DEBUGCRIT,("Unable to open %s\n", lockpath)); return -1; } ======================================== ./ctdb-1.0.114.5/server/eventscript.c: " >/tmp/ctdb.event.%s.%d", tbuf, getpid()); sprintf(buf, "{ pstree -p; cat /proc/locks; ls -li /var/ctdb/ /var/ctdb/persistent; }" " >/tmp/ctdb.event.%s.%d", tbuf, getpid()); system(buf); ======================================== ./ctdb-1.0.114.5/tools/ctdbdiagnostics:ERRORS="/tmp/diagerr.$$" ./ctdb-1.0.114.5/tools/ctdbdiagnostics: tmpf=/tmp/basename $f.node$i ./ctdb-1.0.114.5/tools/ctdbdiagnostics: tmpf=/tmp/basename $f.node$i shell script, easy to exploit. ======================================== ./ctdb-1.0.114.5/config/gdbbacktrace:BATCHFILEPRE=/tmp/gdbbacktracepre.$$ ./ctdb-1.0.114.5/config/gdbbacktrace:BATCHFILEMAIN=/tmp/gdbbacktracemain.$$ shell script, easy to exploit. ======================================== ./ctdb-1.0.114.5/config/ctdb.sysconfig:# defaults to /tmp/ctdb.socket ./ctdb-1.0.114.5/config/ctdb.sysconfig:# CTDBSOCKET=/tmp/ctdb.socket This appears to be used unsafely later on ======================================== ./ctdb-1.0.114.5/include/ctdbprivate.h:#define CTDBPATH "/tmp/ctdb.socket" This appears to be used unsafely later on ========================================
It varies a bit in newer versions but the core problems are present.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2013-4159?
The severity of CVE-2013-4159 is not explicitly rated, but it relates to several temporary file vulnerabilities that can lead to security risks.
How do I fix CVE-2013-4159?
To fix CVE-2013-4159, upgrade to a version of ctdb that is above 2.2, specifically 2.3 or later.
Which versions of OpenSUSE are affected by CVE-2013-4159?
OpenSUSE versions 12.3 and 13.1 are affected by CVE-2013-4159.
Is CVE-2013-4159 specific to ctdb or does it affect other software?
CVE-2013-4159 specifically affects the ctdb software in the mentioned versions.
What are the implications of CVE-2013-4159 on security?
The implications of CVE-2013-4159 relate to potential unauthorized access or modification due to insecure temporary file handling.