Commit graph

4056 commits

Author SHA1 Message Date
Simon McVittie
d97e8f95aa dbus-1.9.6
-----BEGIN PGP SIGNATURE-----
 
 iQIVAwUAVKql4E3o/ypjx8yQAQhvWQ//RYjifPkMdE9ppXQsuLH65laZihPo04Fy
 KqZapj7VUtFShJYB1MdAkvqi3+r/OtIg9pfEg23XB+va24/otZBxgi/r+1Bqi3ww
 XJLHPeEFWVIARbbOFEa3QuUkJa/rhfgVxpj+b41UC7P772YmXcwOAlNhi/mlgxP9
 HGU54e2ANM70/ineMHBM+MjRvxhs67fsZ+IDd3JPpF+W9U5x1OSwPGLx4LwAbKUm
 PIxCLbw9A7zoDOCMUrQyO1SE2q/E9W/UShwMQWppFsyBbyfr7lIaTZSQx+af/eI6
 RXsZVMFLIWXBIS8OoQWKDP3zaTJPvlqI1KUjsCpAUrBI+ExHYauigX9GD+W1T86X
 I+BTFVL60XofCWws4ztk38wvzVYAgc3BW7aiLnl5d2UNIPMGZH2hFwMOxbyexINM
 gbShSyhNVnN0uzpWZzrKqf2JG1NWmPqxoVaOtfHF1T+dbZv2FTbk6jSMzavlzAHZ
 WVVlRWA+0hG4GCd8mSrFbncGwyfgqgfBxXpMVeaqhoiHAixwqT/y8HidTLHnhEHM
 rNOgJrbF8Xd+Tzgh5VS8IGXZeY8Q3JM3QS5TstzJd5pSohQaE6UpPoIuhS1YGzmL
 4YK/wUB6+EKh5p22f1H+VtIanq+l4b1bYok3pNnJhAcYmzHt5YRe3DAt3UBH9ACg
 c6iQqVwZ/fc=
 =jedl
 -----END PGP SIGNATURE-----

Merge tag 'dbus-1.9.6'

dbus-1.9.6

Conflicts:
	NEWS
	configure.ac
2015-01-05 14:58:48 +00:00
Ralf Habacker
fd4f3ca3f6 Fix usage of undefined variable DBUS_WIN32 on cmake build system
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88010
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-05 11:50:11 +01:00
Ralf Habacker
ea54a97f05 Merge branch 'dbus-1.8'
Conflicts:
	NEWS
	configure.ac
2015-01-05 11:49:48 +01:00
Ralf Habacker
01af167b55 Windows cmake cross compile fix
We need to include 'test' subdir in any case not only when using glib.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88009
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-05 11:47:13 +01:00
Ralf Habacker
2abe9ffeb7 Fix of 'dbus-daemon can only handle 64 simultaneous connections on Windows'.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71297
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-01-05 11:47:02 +01:00
Simon McVittie
ae9d7149aa Merge branch 'dbus-1.8' and prepare 1.9.6
Conflicts:
	NEWS
	configure.ac
	test/dbus-daemon.c
2015-01-01 23:48:13 +00:00
Simon McVittie
abbbf449f1 Prepare release for Monday 2015-01-01 23:42:41 +00:00
Simon McVittie
eec885de3b Hardening: only accept Stats function calls at the canonical object path
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]
2015-01-01 23:33:10 +00:00
Simon McVittie
4daf4bdc92 Add a regression test for path-based UpdateActivationEnvironment hardening
Reviewed-by: Thiago Macieira <thiago@kde.org>
2015-01-01 23:32:33 +00:00
Simon McVittie
a67cb9bf1c Hardening: only allow the uid of the dbus-daemon to call UpdateActivationEnvironment
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]
2015-01-01 23:32:22 +00:00
Simon McVittie
6a3f563a4b Hardening: reject UpdateActivationEnvironment on non-canonical path
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]
2015-01-01 23:32:16 +00:00
Илья А. Ткаченко
bf79b97f87 Fix GetExtendedTcpTable crash on vista sp0.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77008
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2014-12-23 11:02:00 +01:00
Simon McVittie
7afacaf653 1.8.13 2014-11-24 22:52:22 +00:00
Simon McVittie
fda9d8a44a 1.9.5 2014-11-24 22:51:44 +00:00
Simon McVittie
be33d75f3a Start spec 0.26 2014-11-24 22:51:11 +00:00
Simon McVittie
1e7653d749 1.9.4 2014-11-24 13:08:06 +00:00
Simon McVittie
4244d86a90 Revert "Start spec 0.26"
This reverts commit cdd9e9a65c.
2014-11-24 13:05:37 +00:00
Simon McVittie
9475a235b9 Upgrade auth_timeout violation to a warning, since this branch has those 2014-11-24 13:05:23 +00:00
Simon McVittie
2bc75daa2c Merge branch 'dbus-1.8'
Conflicts:
	NEWS
	configure.ac
2014-11-24 13:05:09 +00:00
Simon McVittie
4afb7a7412 1.8.12 2014-11-24 13:01:40 +00:00
Simon McVittie
02e1ddf91e Revert "config: change default auth_timeout to 5 seconds"
This reverts commit 54d26df52b.

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
2014-11-22 10:49:21 +00:00
Simon McVittie
29c64424d1 Log to syslog when auth_timeout drops an incomplete connection
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
2014-11-22 10:49:21 +00:00
Simon McVittie
1f1649eada Use DBUS_SYSTEM_LOG_WARNING for failure to alter fd-limits
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85105
2014-11-18 19:13:47 +00:00
Alban Crequy
84db0981e0 DBusSystemLogSeverity: add DBUS_SYSTEM_LOG_WARNING
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85105
2014-11-18 19:13:29 +00:00
Simon McVittie
3630959879 Merge branch 'dbus-1.8' 2014-11-14 19:14:22 +00:00
Simon McVittie
34e5fdee4e README, HACKING: add some brief notes on reporting security vulnerabilities
We now have a private mailing list that can be the security contact.
2014-11-14 19:14:13 +00:00
Simon McVittie
72d7658740 Merge branch 'dbus-1.8' 2014-11-14 18:58:52 +00:00
Simon McVittie
312274137b NEWS 2014-11-14 18:58:44 +00:00
Jacek Bukarewicz
8ee1a7b57c Set error when message delivery is denied due to receive rule
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
2014-11-14 18:40:50 +00:00
Simon McVittie
f44a629679 Merge branch 'dbus-1.8'
Conflicts:
	NEWS
2014-11-10 17:10:09 +00:00
Simon McVittie
3210bda801 next version number will be 1.8.12 2014-11-10 17:09:52 +00:00
Simon McVittie
cdd9e9a65c Start spec 0.26 2014-11-10 17:08:56 +00:00
Simon McVittie
9466b5e62e 1.9.3 2014-11-10 17:07:31 +00:00
Simon McVittie
2a148cdc1b 1.8.11 2014-11-10 17:06:44 +00:00
Simon McVittie
19ab6f3e7a 1.9.2, spec 0.25 2014-11-06 21:02:27 +00:00
Simon McVittie
51a609c8ba Merge branch 'dbus-1.8'
Conflicts:
	NEWS
	configure.ac
2014-11-06 20:59:57 +00:00
Simon McVittie
fc50a44527 Embargoed security release for Monday 2014-11-06 15:39:51 +00:00
Simon McVittie
4e466446d2 CVE-2014-7824: set fd rlimit to 64k for the system dbus-daemon
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=85105
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
2014-11-06 15:31:07 +00:00
Simon McVittie
cec244b596 NEWS 2014-11-06 14:32:50 +00:00
Simon McVittie
ff068fea60 Add NetBSD to the list of platforms where credentials-passing a pid should work
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69702
Reviewed-by: Patrick Welche <prlw1@cam.ac.uk>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
Tested-by: Patrick Welche <prlw1@cam.ac.uk>
2014-11-06 14:29:50 +00:00
Simon McVittie
57e67fc551 test_processid: only assert that it works if we expect it to work
Otherwise, this would fail on, for instance, QNX.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69702
Reviewed-by: Patrick Welche <prlw1@cam.ac.uk>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
Tested-by: Patrick Welche <prlw1@cam.ac.uk>
2014-11-06 14:29:50 +00:00
Patrick Welche
19dc604b2f whitespace/comment fixes
[originally part of the previous commit -smcv]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69702
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
2014-11-06 14:29:50 +00:00
Patrick Welche
f26ade306c Implement NetBSD credentials-passing with LOCAL_PEEREID
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69702
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
Tested-by: Patrick Welche <prlw1@cam.ac.uk>
2014-11-06 14:29:50 +00:00
Simon McVittie
fc2fa25a3f dbus-daemon test: don't assert we pass uid/pid on unknown Unix platforms
We know that Linux, FreeBSD and OpenBSD are "first class citizens"
for credentials-passing, with NetBSD not far behind: people have
turned up on the bug tracking system and told us that tests passed.
On other Unixes, we can't really assert that it works, until someone
who runs them tells us that it worked for them.

Additions to these lists are welcome.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69702
Reviewed-by: Patrick Welche <prlw1@cam.ac.uk>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
Tested-by: Patrick Welche <prlw1@cam.ac.uk>
2014-11-06 14:29:43 +00:00
Simon McVittie
aebc247402 NEWS 2014-10-29 14:21:19 +00:00
Simon McVittie
595dc4f888 dbus-spawn: do not forget the exec() errno when the grandchild exits
As is already noted in a comment in
_dbus_babysitter_set_child_exit_error(), if the grandchild fails
to exec() the desired process, we get both CHILD_EXEC_FAILED (with
an errno) and CHILD_EXITED (with a status), and we want to report
the former, since it is more informative. However, clearing
sitter->errnum meant we lose the errno value.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=24821
Reviewed-by: Ross Lagerwall
2014-10-29 14:16:58 +00:00
Simon McVittie
acec88f32a dbus-tutorial: replace the entire GLib section with "use GDBus"
Also provide links to relevant GLib and Qt documentation.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25140
2014-10-29 14:15:53 +00:00
Simon McVittie
2e4d069ac4 Stop asserting that we're not using the dummy lock implementation
That implementation no longer exists, so neither 0xABCDEF nor 0xABCDEF2
has any special meaning any more.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
2014-10-29 14:12:38 +00:00
Simon McVittie
f541722f5a Use a better NoReply message for disconnection with reply pending
As an implementation detail, dbus-daemon handles this situation by
artificially triggering a timeout (even if its configured timeout for
method calls is in fact infinite). However, using the same debug message
for both is misleading, and can lead people who are debugging a service
crash to blame dbus-daemon instead, wasting their time.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=76112
2014-10-29 14:10:48 +00:00
Simon McVittie
dab9cbc502 dbus-sysdeps-unix: document the assumption that makes our use of credentials secure
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83499
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
2014-10-29 14:06:42 +00:00