- 05 May, 2015 1 commit
-
-
Adrian Szyndela authored
The other code paths that ref or unref a transport are protected by the DBusConnection's lock. This function already used that lock, but for a narrower scope than the refcount manipulation. live_messages_notify() could be triggered by unreffing messages that originated from the same connection in a different thread. [smcv: added commit message] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90312Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk>
-
- 28 Apr, 2015 1 commit
-
-
Ralf Habacker authored
Reported by Coverity: CID 54749: Missing unlock (LOCK) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk>
-
- 15 Apr, 2015 1 commit
-
-
Ralf Habacker authored
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=87999Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk> (cherry picked from commit fa1ada44) Conflicts: cmake/test/CMakeLists.txt test/Makefile.am
-
- 13 Apr, 2015 2 commits
-
-
Ralf Habacker authored
The watches added on connection setup should be removed on shutdown. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90005Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk>
-
Ralf Habacker authored
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90004Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk>
-
- 09 Feb, 2015 1 commit
-
-
Ralf Habacker authored
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=87999Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk> (cherry picked from commit 795ea300)
-
- 05 Feb, 2015 1 commit
-
-
Simon McVittie authored
-
- 04 Feb, 2015 3 commits
-
-
Simon McVittie authored
-
Simon McVittie authored
Without either this rule or better checking in dbus-daemon, non-systemd processes can make dbus-daemon think systemd failed to activate a system service, resulting in an error reply back to the requester. This is redundant with the fix in the C code (which I consider to be the real solution), but is likely to be easier to backport. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88811 Reviewed-by: Alban Crequy Reviewed-by: David King Reviewed-by: Philip Withnall
-
Simon McVittie authored
-
- 05 Jan, 2015 4 commits
-
-
Simon McVittie authored
-
Simon McVittie authored
dbus-1.8.14
-
Ralf Habacker authored
We need to include 'test' subdir in any case not only when using glib. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88009Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk>
-
Ralf Habacker authored
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71297Reviewed-by:
Ralf Habacker <ralf.habacker@freenet.de>
-
- 01 Jan, 2015 5 commits
-
-
Simon McVittie authored
-
Simon McVittie authored
These function calls are not a privilege escalation risk like UpdateActivationEnvironment, but they might provide sensitive information or be enhanced to provide sensitive information in future, so the default system.conf locks them down to root-only. Apply the same canonical-object-path hardening as for UpdateActivationEnvironment. We do not apply the uid check here because they are less dangerous than UpdateActivationEnvironment, and because the ability to unlock these function calls for specific uids is a documented configuration for developers. Reviewed-by:
Thiago Macieira <thiago@kde.org> [added missing #include; extended commit message -smcv]
-
Simon McVittie authored
Reviewed-by:
Thiago Macieira <thiago@kde.org>
-
Simon McVittie authored
As with the previous commit, this is probably not actually privilege escalation due to the use of an activation helper that cleans up its environment, but let's be extra-careful here. Reviewed-by:
Thiago Macieira <thiago@kde.org> [adjusted commit message -smcv]
-
Simon McVittie authored
UpdateActivationEnvironment is the one dbus-daemon API call that is obviously dangerous (it is intended for the session bus), so the default system.conf does not allow anyone to call it. It has recently come to the D-Bus maintainers' attention that some system services incorrectly install D-Bus policy rules that allow arbitrary method calls to any destination as long as they have a "safe" object path. This is not actually safe: some system services that use low-level D-Bus bindings like libdbus, including dbus-daemon itself, provide the same API on all object paths. Unauthorized calls to UpdateActivationEnvironment are probably just resource consumption rather than privilege escalation, because on the system bus, the modified environment is only used to execute a setuid wrapper that avoids LD_PRELOAD etc. via normal setuid handling, and sanitizes its own environment before executing the real service. However, it's safest to assume the worst and treat it as a potential privilege escalation. Accordingly, as a hardening measure to avoid privilege escalation on systems with these faulty services, stop allowing calls to ("/com/example/Whatever", "org.freedesktop.DBus.UpdateActivationEnvironment") and only allow ("/org/freedesktop/DBus", "org.freedesktop.DBus.UpdateActivationEnvironment"). We deliberately continue to provide read-only APIs like GetConnectionUnixUser at all object paths, for backwards compatibility. Reviewed-by:
Thiago Macieira <thiago@kde.org> [adjusted commit message to note that this is probably only DoS -smcv]
-
- 23 Dec, 2014 1 commit
-
-
Илья А. Ткаченко authored
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77008Reviewed-by:
Ralf Habacker <ralf.habacker@freenet.de>
-
- 24 Nov, 2014 2 commits
-
-
Simon McVittie authored
-
Simon McVittie authored
-
- 22 Nov, 2014 2 commits
-
-
Simon McVittie authored
This reverts commit 54d26df5. It appears this change may cause intermittent slow or failed boot, more commonly on slower/older machines, in at least Mageia and possibly also Debian. This would indicate that while the system is under load, system services are not completing authentication within 5 seconds. This change was not the main part of fixing CVE-2014-3639, but does help to mitigate that attack. As such, increasing this timeout makes the denial of service attack described by CVE-2014-3639 somewhat more effective: a local user connecting to the system bus repeatedly from many parallel processes can cause other users' attempts to connect to take longer. If your machine boots reliably with the shorter timeout, and resilience against local denial of service attacks is important to you, putting this in /etc/dbus-1/system-local.conf or a file matching /etc/dbus-1/system.d/*.conf can restore the lower limit: <busconfig> <limit name="auth_timeout">5000</limit> </busconfig> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=86431
-
Simon McVittie authored
This is a symptom of either a denial of service attack, or a serious performance problem. Either way, sysadmins should know. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=86431
-
- 14 Nov, 2014 3 commits
-
-
Simon McVittie authored
We now have a private mailing list that can be the security contact.
-
Simon McVittie authored
-
Jacek Bukarewicz authored
This makes bus_context_check_security_policy follow convention of setting errors if function indicates failure and has error parameter. Notable implication is that AccessDenied error will be sent if sending message to addressed recipient is denied due to receive rule. Previously, message was silently dropped. This also fixes assertion failure when message is denied at addressed recipient while sending pending auto activation messages. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=86194
-
- 10 Nov, 2014 2 commits
-
-
Simon McVittie authored
-
Simon McVittie authored
-
- 06 Nov, 2014 2 commits
-
-
Simon McVittie authored
-
Simon McVittie authored
This ensures that our rlimit is actually high enough to avoid the denial of service described in CVE-2014-3636 part A. CVE-2014-7824 has been allocated for this incomplete fix. Restore the original rlimit for activated services, to avoid them getting undesired higher limits. (Thanks to Alban Crequy for various adjustments which have been included in this commit.) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85105Reviewed-by:
Alban Crequy <alban.crequy@collabora.co.uk>
-
- 16 Sep, 2014 1 commit
-
-
Simon McVittie authored
-
- 15 Sep, 2014 8 commits
-
-
Simon McVittie authored
-
Simon McVittie authored
This addresses CVE-2014-3635. If (*n_fds * sizeof (int) % sizeof (size_t)) is nonzero, then CMSG_SPACE (*n_fds * sizeof (int)) > CMSG_LEN (*n_fds * sizeof (int) because the SPACE includes padding to a size_t boundary, whereas the LEN does not. We have to allocate the SPACE. Previously, we told the kernel that the buffer size we wanted was the SPACE, not the LEN, which meant it was free to fill the padding with additional fds: on a 64-bit platform with 32-bit int, that's one extra fd, if *n_fds happens to be odd. This meant that a malicious sender could send exactly 1 fd too many, which would make us fail an assertion if enabled, or overrun a buffer by 1 fd otherwise. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83622Reviewed-by:
Alban Crequy <alban.crequy@collabora.co.uk>
-
Simon McVittie authored
This means we can use _DBUS_STATIC_ASSERT at non-global scope without tripping -Wunused-local-typedefs. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83767Reviewed-by:
Alban Crequy <alban.crequy@collabora.co.uk> (cherry picked from commit 0e3d08d4)
-
Alban Crequy authored
This is one of four commits needed to address CVE-2014-3637. The bus uses _dbus_connection_set_pending_fds_function and _dbus_connection_get_pending_fds_count to be notified when there are pending file descriptors. A timeout per connection is armed and disarmed when the file descriptor list is used and emptied. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80559Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk>
-
Alban Crequy authored
This is one of four commits needed to address CVE-2014-3637. This will allow the bus to be notified whenever a file descriptor is added or removed from a DBusConnection's DBusMessageLoader. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80559Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk>
-
Alban Crequy authored
This is one of four commits needed to address CVE-2014-3637. This will allow the bus to know whether there are pending file descriptors in a DBusConnection's DBusMessageLoader. https://bugs.freedesktop.org/show_bug.cgi?id=80559Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk> [fix compilation on platforms that do not HAVE_UNIX_FD_PASSING -smcv] Signed-off-by:
Simon McVittie <simon.mcvittie@collabora.co.uk>
-
Alban Crequy authored
This is one of four commits needed to address CVE-2014-3637. When a file descriptor is passed to dbus-daemon, the associated D-Bus message might not be fully sent to dbus-daemon yet. Dbus-daemon keeps the file descriptor in the DBusMessageLoader of the connection, waiting for the rest of the message. If the client stops sending the remaining bytes, dbus-daemon will wait forever and keep that file descriptor. This patch adds pending_fd_timeout (milliseconds) in the configuration to disconnect a connection after a timeout when a file descriptor was sent but not the remaining message. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80559Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk>
-
Alban Crequy authored
This addresses the parts of CVE-2014-3639 not already addressed by reducing the default authentication timeout. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80851 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80919Reviewed-by:
Simon McVittie <simon.mcvittie@collabora.co.uk>
-