Commit graph

4417 commits

Author SHA1 Message Date
Ralf Habacker
fa1ada44ea Add manual tcp test case.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=87999
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-30 09:33:40 +01:00
Simon McVittie
b5bf338953 _dbus_string_append_printf_valist: avoid leaking copy of varargs
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88087
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-29 12:09:40 +00:00
Simon McVittie
04056bba41 Use pygi instead of pygobject 2
pygobject 2 is obsolete and unmaintained, and anyway this is for
optional functionality (full regression test coverage) rather than
anything that will be needed in production builds.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85969
2015-01-27 14:29:59 +00:00
Thiago Macieira
180f3a8061 Fix build with --enable-maintainer-mode --disable-embedded-tests
Otherwise, we get:
dbus/dbus-object-tree.c:323:1: error: 'find_subtree' defined but not used [-Werror=unused-function]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=87837
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-27 14:18:03 +00:00
Simon McVittie
254b47aa68 When generating random messages, exercise empty signature as intended
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88089
2015-01-06 22:45:27 +00:00
Simon McVittie
778c4ee281 _dbus_marshal_validate_test: test both /foo/ and foo/
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88089
2015-01-06 22:45:27 +00:00
Simon McVittie
c89cbed909 selinux: avoid leaking on systems where va_start allocates memory
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88087
2015-01-06 22:12:27 +00:00
Simon McVittie
1650d77bf1 Fix assertion in regression test to be equality test, not assignment
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88088
2015-01-06 22:08:47 +00:00
Simon McVittie
4a7cb0cb6f Merge branch 'dbus-1.8'
Conflicts:
	NEWS
	configure.ac
2015-01-05 15:00:45 +00:00
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
Simon McVittie
a559ed3508 1.8.15 2015-01-05 14:57:26 +00:00
Simon McVittie
9a8bf9d810 dbus-1.8.14
-----BEGIN PGP SIGNATURE-----
 
 iQIVAwUAVKql8U3o/ypjx8yQAQjkMRAAoFSUlMmZF52fRX/LIsLmsAU6btzYgU0A
 Bj+JbpSCLBBd+Te0WDHugSol63cAbI+SWTxkdl0K/1+Bsr4MUEcMTf+6yVHArte4
 +zUs2DAPrK7LYU6U2qiVWmIn3tBS7vf6RiGiqBZu0nm+//lc5IO7M31uVbXaiT/X
 03wQ+RPV0J715wkNZTi1t+yTStRtGbuw7rTxYPtgJOa1fuOxGGh07wPFJUc/gbU3
 kq9XSAsqDmDQjh1cufbnJOB+lsxAj8AYlz7Lb8O1nM1AwyuJa3CO4bk37XqFTxk9
 q6rocequK/MeN3f3hMAQkEF4c1nq/9ibKeE+Pn1qZ+yUSPxXqjsdvlxEdbS5wx5R
 q5A1z27o5b1KitMWSlMxzgwx2BP2oM/gDU1HuEIfFztE0HjLOc+pS1cv8iTojTVT
 rzLqcNrhDCcZT9ocC/Y428y+WwYPEcjhuVB9TYo2Q42/Czexz0394Aze1lZzDtkl
 E1Fz0o0PuYMjFh7E0VGQHGfucVJMLZE/pXwYafSU47R1htErhr/3se/CYn0SfUBN
 9wkA9/E+V/7US2qdNOEfe8dx0y610Sk5y8BOW/AGIANTQjVLbQJp2lYjUnFaKgQL
 D/pYPI9viGBYr2jAmQIarPAZjljOu+F9DD3mqStn6tuxxytl4kQtNKVonJ3hxVPV
 9riJ4ce7iNM=
 =UAl+
 -----END PGP SIGNATURE-----

Merge tag 'dbus-1.8.14' into dbus-1.8

dbus-1.8.14
2015-01-05 14:56:44 +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