CVE-2013-4159: High severity Ctdb Project Ctdb vulnerability

Published Jul 22, 2013
·
Updated

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

7 affected components
Ctdb Project Ctdb<=2.2
Ctdb Project Ctdb=2.0
Ctdb Project Ctdb=2.1
openSUSE openSUSE=12.3
openSUSE openSUSE=13.1
Mageia Mageia=3.0
Mageia Mageia=4.0

Event History

Jul 22, 2013
Data Sourced
04:47 AM
DescriptionSeverityAffected Software
Aug 6, 2014
CVE Published
via MITRE·06:00 PM
Data Sourced
via MITRE·06:00 PM
Description

Frequently Asked Questions

1

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.

2

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.

3

Which versions of OpenSUSE are affected by CVE-2013-4159?

OpenSUSE versions 12.3 and 13.1 are affected by CVE-2013-4159.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203