[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#877403: marked as done (stretch-pu: package dbus/1.10.24-0+deb9u1)



Your message dated Sat, 09 Dec 2017 10:46:36 +0000
with message-id <1512816396.1994.30.camel@adam-barratt.org.uk>
and subject line Closing bugs for updates included in stretch point release
has caused the Debian Bug report #877403,
regarding stretch-pu: package dbus/1.10.24-0+deb9u1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
877403: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877403
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian.org@packages.debian.org
Usertags: pu

I've made another upstream stable release of dbus, and as usual I'd like
to update stretch via stretch-p-u, to minimize weirdness and diffstat
if I have to do a security release later. There is nothing particularly
vital here, and I can revert or fix anything that the SRMs are not
happy with.

If you want to say "yes but only after 9.2", that would also be fine.

This upstream release is in testing already (versioned as
1.11.16+really1.10.24-1 due to an unfortunate dch -r accident).
This will probably be the last 1.10.x release in testing/unstable,
since I'm planning to move to the 1.11.x branch in preparation for
starting a 1.12.0 stable branch upstream.

The attached debdiff excludes ./configure, which gets
regenerated during the build.

(I still need to smoke-test this on a real stretch system, which I'll
do before upload; it passes autopkgtests though.)

Thanks,
    smcv
debdiff dbus_1.10.{22,24}-0+deb9u1.dsc | filterdiff --exclude='*/configure'

diffstat for dbus-1.10.22 dbus-1.10.24

 NEWS                      |   26 ++++++
 aclocal.m4                |    2 
 bus/activation.c          |   10 +-
 bus/config-loader-expat.c |   14 +++
 bus/connection.c          |   13 +--
 bus/connection.h          |    2 
 bus/dispatch.c            |   56 ++++++++++---
 bus/driver.c              |    4 
 bus/signals.c             |   15 ++-
 config.h.in               |    3 
 configure                 |   48 +++++++----
 configure.ac              |   12 ++
 dbus/dbus-sysdeps-unix.c  |   11 +-
 debian/changelog          |   21 ++++
 test/monitor.c            |  197 +++++++++++++++++++++++++++++++++++++++-------
 tools/dbus-send.c         |    2 
 16 files changed, 363 insertions(+), 73 deletions(-)

diff -Nru dbus-1.10.22/aclocal.m4 dbus-1.10.24/aclocal.m4
--- dbus-1.10.22/aclocal.m4	2017-07-27 14:03:36.000000000 +0100
+++ dbus-1.10.24/aclocal.m4	2017-09-25 21:03:14.000000000 +0100
@@ -883,7 +883,7 @@
   dnl supported. (2.0 was released on October 16, 2000).
   dnl FIXME: Remove the need to hard-code Python versions here.
   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
-[python python2 python3 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
+[python python2 python3 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
 
   AC_ARG_VAR([PYTHON], [the Python interpreter])
diff -Nru dbus-1.10.22/bus/activation.c dbus-1.10.24/bus/activation.c
--- dbus-1.10.22/bus/activation.c	2017-02-16 13:46:23.000000000 +0000
+++ dbus-1.10.24/bus/activation.c	2017-09-25 14:54:34.000000000 +0100
@@ -1967,6 +1967,7 @@
           DBusString service_string;
           BusService *service;
           BusRegistry *registry;
+          DBusConnection *systemd = NULL;
 
           /* OK, we have a systemd service configured for this entry,
              hence let's enqueue an activation request message. This
@@ -2015,11 +2016,14 @@
           _dbus_string_init_const (&service_string, "org.freedesktop.systemd1");
           service = bus_registry_lookup (registry, &service_string);
 
+          if (service)
+            systemd = bus_service_get_primary_owners_connection (service);
+
           /* Following the general principle of "log early and often",
            * we capture that we *want* to send the activation message, even if
            * systemd is not actually there to receive it yet */
           if (!bus_transaction_capture (activation_transaction,
-                NULL, message))
+                                        NULL, systemd, message))
             {
               dbus_message_unref (message);
               BUS_SET_OOM (error);
@@ -2033,8 +2037,8 @@
                                service_name,
                                entry->systemd_service);
               /* Wonderful, systemd is connected, let's just send the msg */
-              retval = bus_dispatch_matches (activation_transaction, NULL, bus_service_get_primary_owners_connection (service),
-                                             message, error);
+              retval = bus_dispatch_matches (activation_transaction, NULL,
+                                             systemd, message, error);
             }
           else
             {
diff -Nru dbus-1.10.22/bus/config-loader-expat.c dbus-1.10.24/bus/config-loader-expat.c
--- dbus-1.10.22/bus/config-loader-expat.c	2017-07-27 12:57:16.000000000 +0100
+++ dbus-1.10.24/bus/config-loader-expat.c	2017-07-28 11:15:46.000000000 +0100
@@ -203,6 +203,20 @@
       goto failed;
     }
 
+  /* We do not need protection against hash collisions (CVE-2012-0876)
+   * because we are only parsing trusted XML; and if we let Expat block
+   * waiting for the CSPRNG to be initialized, as it does by default to
+   * defeat CVE-2012-0876, it can cause timeouts during early boot on
+   * entropy-starved embedded devices.
+   *
+   * TODO: When Expat gets a more explicit API for this than
+   * XML_SetHashSalt, check for that too, and use it preferentially.
+   * https://github.com/libexpat/libexpat/issues/91 */
+#if defined(HAVE_XML_SETHASHSALT)
+  /* Any nonzero number will do. https://xkcd.com/221/ */
+  XML_SetHashSalt (expat, 4);
+#endif
+
   if (!_dbus_string_get_dirname (file, &dirname))
     {
       dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
diff -Nru dbus-1.10.22/bus/connection.c dbus-1.10.24/bus/connection.c
--- dbus-1.10.22/bus/connection.c	2017-02-01 11:09:18.000000000 +0000
+++ dbus-1.10.24/bus/connection.c	2017-09-25 14:54:34.000000000 +0100
@@ -2208,6 +2208,7 @@
 dbus_bool_t
 bus_transaction_capture (BusTransaction *transaction,
                          DBusConnection *sender,
+                         DBusConnection *addressed_recipient,
                          DBusMessage    *message)
 {
   BusConnections *connections;
@@ -2227,8 +2228,8 @@
    * There's little point, since there is up to 1 per process. */
   _dbus_assert (mm != NULL);
 
-  if (!bus_matchmaker_get_recipients (mm, connections, sender, NULL, message,
-        &recipients))
+  if (!bus_matchmaker_get_recipients (mm, connections, sender,
+        addressed_recipient, message, &recipients))
     goto out;
 
   for (link = _dbus_list_get_first_link (&recipients);
@@ -2250,6 +2251,7 @@
 
 dbus_bool_t
 bus_transaction_capture_error_reply (BusTransaction  *transaction,
+                                     DBusConnection  *addressed_recipient,
                                      const DBusError *error,
                                      DBusMessage     *in_reply_to)
 {
@@ -2276,7 +2278,7 @@
   if (!dbus_message_set_sender (reply, DBUS_SERVICE_DBUS))
     goto out;
 
-  ret = bus_transaction_capture (transaction, NULL, reply);
+  ret = bus_transaction_capture (transaction, NULL, addressed_recipient, reply);
 
 out:
   dbus_message_unref (reply);
@@ -2318,7 +2320,7 @@
   /* Capture it for monitors, even if the real recipient's receive policy
    * does not allow it to receive this message from us (which would be odd).
    */
-  if (!bus_transaction_capture (transaction, NULL, message))
+  if (!bus_transaction_capture (transaction, NULL, connection, message))
     return FALSE;
 
   /* If security policy doesn't allow the message, we would silently
@@ -2330,7 +2332,8 @@
                                           transaction,
                                           NULL, connection, connection, message, &error))
     {
-      if (!bus_transaction_capture_error_reply (transaction, &error, message))
+      if (!bus_transaction_capture_error_reply (transaction, connection,
+                                                &error, message))
         {
           bus_context_log (transaction->context, DBUS_SYSTEM_LOG_WARNING,
                            "message from dbus-daemon rejected but not enough "
diff -Nru dbus-1.10.22/bus/connection.h dbus-1.10.24/bus/connection.h
--- dbus-1.10.22/bus/connection.h	2015-11-23 21:53:42.000000000 +0000
+++ dbus-1.10.24/bus/connection.h	2017-09-25 14:54:34.000000000 +0100
@@ -134,8 +134,10 @@
                                                   DBusMessage                  *message);
 dbus_bool_t     bus_transaction_capture          (BusTransaction               *transaction,
                                                   DBusConnection               *connection,
+                                                  DBusConnection               *addressed_recipient,
                                                   DBusMessage                  *message);
 dbus_bool_t     bus_transaction_capture_error_reply (BusTransaction            *transaction,
+                                                  DBusConnection               *addressed_recipient,
                                                   const DBusError              *error,
                                                   DBusMessage                  *in_reply_to);
 dbus_bool_t     bus_transaction_send_from_driver (BusTransaction               *transaction,
diff -Nru dbus-1.10.22/bus/dispatch.c dbus-1.10.24/bus/dispatch.c
--- dbus-1.10.22/bus/dispatch.c	2015-11-23 21:53:42.000000000 +0000
+++ dbus-1.10.24/bus/dispatch.c	2017-09-25 14:54:34.000000000 +0100
@@ -72,8 +72,8 @@
                                           message,
                                           &stack_error))
     {
-      if (!bus_transaction_capture_error_reply (transaction, &stack_error,
-                                                message))
+      if (!bus_transaction_capture_error_reply (transaction, sender,
+                                                &stack_error, message))
         {
           bus_context_log (context, DBUS_SYSTEM_LOG_WARNING,
                            "broadcast rejected, but not enough "
@@ -93,8 +93,8 @@
                       bus_connection_get_name (connection),
                       bus_connection_get_loginfo (connection));
 
-      if (!bus_transaction_capture_error_reply (transaction, &stack_error,
-                                                message))
+      if (!bus_transaction_capture_error_reply (transaction, sender,
+                                                &stack_error, message))
         {
           bus_context_log (context, DBUS_SYSTEM_LOG_WARNING,
                            "broadcast with Unix fd not delivered, but not "
@@ -370,15 +370,15 @@
    */
   service_name = dbus_message_get_destination (message);
 
-  if (!bus_transaction_capture (transaction, connection, message))
-    {
-      BUS_SET_OOM (&error);
-      goto out;
-    }
-
   if (service_name &&
       strcmp (service_name, DBUS_SERVICE_DBUS) == 0) /* to bus driver */
     {
+      if (!bus_transaction_capture (transaction, connection, NULL, message))
+        {
+          BUS_SET_OOM (&error);
+          goto out;
+        }
+
       if (!bus_context_check_security_policy (context, transaction,
                                               connection, NULL, NULL, message, &error))
         {
@@ -392,6 +392,12 @@
     }
   else if (!bus_connection_is_active (connection)) /* clients must talk to bus driver first */
     {
+      if (!bus_transaction_capture (transaction, connection, NULL, message))
+        {
+          BUS_SET_OOM (&error);
+          goto out;
+        }
+
       _dbus_verbose ("Received message from non-registered client. Disconnecting.\n");
       dbus_connection_close (connection);
       goto out;
@@ -412,6 +418,14 @@
       if (service == NULL && dbus_message_get_auto_start (message))
         {
           BusActivation *activation;
+
+          if (!bus_transaction_capture (transaction, connection, NULL,
+                                        message))
+            {
+              BUS_SET_OOM (&error);
+              goto out;
+            }
+
           /* We can't do the security policy check here, since the addressed
            * recipient service doesn't exist yet. We do it before sending the
            * message after the service has been created.
@@ -430,6 +444,13 @@
         }
       else if (service == NULL)
         {
+          if (!bus_transaction_capture (transaction, connection,
+                                        NULL, message))
+            {
+              BUS_SET_OOM (&error);
+              goto out;
+            }
+
           dbus_set_error (&error,
                           DBUS_ERROR_NAME_HAS_NO_OWNER,
                           "Name \"%s\" does not exist",
@@ -440,6 +461,21 @@
         {
           addressed_recipient = bus_service_get_primary_owners_connection (service);
           _dbus_assert (addressed_recipient != NULL);
+
+          if (!bus_transaction_capture (transaction, connection,
+                                        addressed_recipient, message))
+            {
+              BUS_SET_OOM (&error);
+              goto out;
+            }
+        }
+    }
+  else /* service_name == NULL */
+    {
+      if (!bus_transaction_capture (transaction, connection, NULL, message))
+        {
+          BUS_SET_OOM (&error);
+          goto out;
         }
     }
 
diff -Nru dbus-1.10.22/bus/driver.c dbus-1.10.24/bus/driver.c
--- dbus-1.10.22/bus/driver.c	2016-10-10 10:06:26.000000000 +0100
+++ dbus-1.10.24/bus/driver.c	2017-09-25 16:20:08.000000000 +0100
@@ -257,7 +257,7 @@
 
   _dbus_assert (dbus_message_has_signature (message, "sss"));
 
-  if (!bus_transaction_capture (transaction, NULL, message))
+  if (!bus_transaction_capture (transaction, NULL, NULL, message))
     goto oom;
 
   retval = bus_dispatch_matches (transaction, NULL, NULL, message, error);
@@ -1026,7 +1026,7 @@
 
       activation = bus_context_get_activation (context);
 
-      if (!bus_transaction_capture (transaction, NULL, message))
+      if (!bus_transaction_capture (transaction, NULL, NULL, message))
         {
           BUS_SET_OOM (error);
           _dbus_verbose ("No memory for bus_transaction_capture()");
diff -Nru dbus-1.10.22/bus/signals.c dbus-1.10.24/bus/signals.c
--- dbus-1.10.22/bus/signals.c	2015-11-23 21:53:42.000000000 +0000
+++ dbus-1.10.24/bus/signals.c	2017-09-25 14:54:34.000000000 +0100
@@ -1887,9 +1887,18 @@
         return FALSE;
 
       if (addressed_recipient == NULL)
-        {          
-          if (strcmp (rule->destination,
-                      DBUS_SERVICE_DBUS) != 0)
+        {
+          /* If the message is going to be delivered to the dbus-daemon
+           * itself, its destination will be "org.freedesktop.DBus",
+           * which we again match against the rule (see bus_dispatch()
+           * in bus/dispatch.c, which checks for o.fd.DBus first).
+           *
+           * If we are monitoring and we don't know who is going to receive
+           * the message (for instance because they haven't been activated yet),
+           * assume they will own the requested destination name and no other,
+           * and match the rule's destination against that.
+           */
+          if (strcmp (rule->destination, destination) != 0)
             return FALSE;
         }
       else
diff -Nru dbus-1.10.22/config.h.in dbus-1.10.24/config.h.in
--- dbus-1.10.22/config.h.in	2017-07-27 14:04:34.000000000 +0100
+++ dbus-1.10.24/config.h.in	2017-09-25 21:07:38.000000000 +0100
@@ -381,6 +381,9 @@
 /* Define to 1 if you have the <ws2tcpip.h> header file. */
 #undef HAVE_WS2TCPIP_H
 
+/* Define to 1 if you have the `XML_SetHashSalt' function. */
+#undef HAVE_XML_SETHASHSALT
+
 /* Define to the sub-directory where libtool stores uninstalled libraries. */
 #undef LT_OBJDIR
 
diff -Nru dbus-1.10.22/configure.ac dbus-1.10.24/configure.ac
--- dbus-1.10.22/configure.ac	2017-07-27 13:57:03.000000000 +0100
+++ dbus-1.10.24/configure.ac	2017-09-25 21:02:34.000000000 +0100
@@ -3,7 +3,7 @@
 
 m4_define([dbus_major_version], [1])
 m4_define([dbus_minor_version], [10])
-m4_define([dbus_micro_version], [22])
+m4_define([dbus_micro_version], [24])
 m4_define([dbus_version],
           [dbus_major_version.dbus_minor_version.dbus_micro_version])
 AC_INIT([dbus],[dbus_version],[https://bugs.freedesktop.org/enter_bug.cgi?product=dbus],[dbus])
@@ -38,7 +38,7 @@
 
 ## increment any time the source changes; set to
 ##  0 if you increment CURRENT
-LT_REVISION=13
+LT_REVISION=14
 
 ## increment if any interfaces have been added; set to 0
 ## if any interfaces have been changed or removed. removal has
@@ -938,6 +938,14 @@
 AC_SUBST([XML_CFLAGS])
 AC_SUBST([XML_LIBS])
 
+save_cflags="$CFLAGS"
+save_libs="$LIBS"
+CFLAGS="$CFLAGS $XML_CFLAGS"
+LIBS="$LIBS $XML_LIBS"
+AC_CHECK_FUNCS([XML_SetHashSalt])
+CFLAGS="$save_cflags"
+LIBS="$save_libs"
+
 # Thread lib detection
 AC_ARG_VAR([THREAD_LIBS])
 save_libs="$LIBS"
diff -Nru dbus-1.10.22/dbus/dbus-sysdeps-unix.c dbus-1.10.24/dbus/dbus-sysdeps-unix.c
--- dbus-1.10.22/dbus/dbus-sysdeps-unix.c	2017-02-16 13:46:23.000000000 +0000
+++ dbus-1.10.24/dbus/dbus-sysdeps-unix.c	2017-08-15 17:20:38.000000000 +0100
@@ -1195,7 +1195,7 @@
       return -1;
     }
 
-  if (listen (listen_fd, 30 /* backlog */) < 0)
+  if (listen (listen_fd, SOMAXCONN /* backlog */) < 0)
     {
       dbus_set_error (error, _dbus_error_from_errno (errno),
                       "Failed to listen on socket \"%s\": %s",
@@ -2052,13 +2052,13 @@
     ucred_t * ucred = NULL;
     if (getpeerucred (client_fd.fd, &ucred) == 0)
       {
+#ifdef HAVE_ADT
+        adt_session_data_t *adth = NULL;
+#endif
         pid_read = ucred_getpid (ucred);
         uid_read = ucred_geteuid (ucred);
 #ifdef HAVE_ADT
         /* generate audit session data based on socket ucred */
-        adt_session_data_t *adth = NULL;
-        adt_export_data_t *data = NULL;
-        size_t size = 0;
         if (adt_start_session (&adth, NULL, 0) || (adth == NULL))
           {
             _dbus_verbose ("Failed to adt_start_session(): %s\n", _dbus_strerror (errno));
@@ -2071,7 +2071,8 @@
               }
             else
               {
-                size = adt_export_session_data (adth, &data);
+                adt_export_data_t *data = NULL;
+                size_t size = adt_export_session_data (adth, &data);
                 if (size <= 0)
                   {
                     _dbus_verbose ("Failed to adt_export_session_data(): %s\n", _dbus_strerror (errno));
diff -Nru dbus-1.10.22/debian/changelog dbus-1.10.24/debian/changelog
--- dbus-1.10.22/debian/changelog	2017-07-30 11:23:02.000000000 +0100
+++ dbus-1.10.24/debian/changelog	2017-10-01 12:09:14.000000000 +0100
@@ -1,3 +1,24 @@
+dbus (1.10.24-0+deb9u1) stretch; urgency=medium
+
+  * New upstream stable release
+    - dbus/dbus-sysdeps-unix.c: Increase listen() backlog of
+      AF_UNIX sockets to the maximum possible, minimizing failed
+      connections under heavy load (Closes: #872144)
+    - bus/config-loader-expat.c: When parsing dbus-daemon
+      configuration, don't delay startup if high-quality entropy
+      is not yet available: we trust the configuration anyway, so
+      algorithmic complexity attacks via hash table collisions
+      are not a concern
+    - bus/*: When using the Monitoring interface, match message
+      filters that specify a destination correctly
+      - test/monitor.c: Add test-cases for this
+    - tools/dbus-send.c: Avoid a compiler warning when gcc gets
+      confused about a conditionally-initialized variable
+    - dbus/dbus-sysdeps-unix.c: Avoid a compiler warning on Solaris
+      (not relevant to Debian)
+
+ -- Simon McVittie <smcv@debian.org>  Sun, 01 Oct 2017 12:09:14 +0100
+
 dbus (1.10.22-0+deb9u1) stretch; urgency=medium
 
   * New upstream stable release
diff -Nru dbus-1.10.22/NEWS dbus-1.10.24/NEWS
--- dbus-1.10.22/NEWS	2017-07-27 13:56:49.000000000 +0100
+++ dbus-1.10.24/NEWS	2017-09-25 21:01:00.000000000 +0100
@@ -1,3 +1,29 @@
+D-Bus 1.10.24 (2017-09-25)
+==
+
+The “pirate wizard” release.
+
+Fixes:
+
+• When parsing dbus-daemon configuration, tell Expat not to use
+  cryptographic-quality entropy as a salt for its hash tables: we trust
+  the configuration files, so we are not concerned about algorithmic
+  complexity attacks via hash table collisions. This prevents
+  dbus-daemon --system from holding up the boot process (and causing
+  early-boot system services like systemd, logind, networkd to time
+  out) on entropy-starved embedded systems.
+  (fd.o #101858, Simon McVittie)
+
+• Increase listen() backlog of AF_UNIX sockets to the maximum possible,
+  minimizing failed connections under heavy load
+  (fd.o #95264, Lennart Poettering) (backported from 1.11.4)
+
+• Avoid a -Werror=declaration-after-statement build failure on Solaris
+  (fd.o #102145, Alan Coopersmith)
+
+• When using the Monitoring interface, match messages' destinations
+  (fd.o #92074, Simon McVittie) (backported from 1.11.0)
+
 D-Bus 1.10.22 (2017-07-27)
 ==
 
diff -Nru dbus-1.10.22/test/monitor.c dbus-1.10.24/test/monitor.c
--- dbus-1.10.22/test/monitor.c	2015-11-23 21:53:42.000000000 +0000
+++ dbus-1.10.24/test/monitor.c	2017-09-25 14:54:34.000000000 +0100
@@ -92,6 +92,11 @@
     FALSE
 };
 
+static const char * const well_known_destination_match_rules[] = {
+    "destination='com.example.Recipient'",
+    NULL
+};
+
 static Config forbidding_config = {
     "valid-config-files/forbidding.conf",
     NULL,
@@ -110,6 +115,12 @@
     FALSE
 };
 
+static Config well_known_destination_config = {
+    NULL,
+    well_known_destination_match_rules,
+    FALSE
+};
+
 static Config no_rules_config = {
     NULL,
     no_match_rules,
@@ -415,6 +426,19 @@
 }
 
 static void
+take_well_known_name (Fixture *f,
+    DBusConnection *connection,
+    const char *name)
+{
+  int ret;
+
+  ret = dbus_bus_request_name (connection, name,
+      DBUS_NAME_FLAG_DO_NOT_QUEUE, &f->e);
+  test_assert_no_error (&f->e);
+  g_assert_cmpint (ret, ==, DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER);
+}
+
+static void
 setup (Fixture *f,
     gconstpointer context)
 {
@@ -446,7 +470,8 @@
 }
 
 static void
-become_monitor (Fixture *f)
+become_monitor (Fixture *f,
+    const Config *config)
 {
   DBusMessage *m;
   DBusPendingCall *pc;
@@ -458,8 +483,11 @@
 
   dbus_connection_set_route_peer_messages (f->monitor, TRUE);
 
-  if (f->config != NULL && f->config->match_rules != NULL)
-    match_rules = f->config->match_rules;
+  if (config == NULL)
+    config = f->config;
+
+  if (config != NULL && config->match_rules != NULL)
+    match_rules = config->match_rules;
   else
     match_rules = wildcard_match_rules;
 
@@ -746,7 +774,7 @@
         }
     }
 
-  become_monitor (f);
+  become_monitor (f, NULL);
 
   while (!lost_unique || !lost_a || !lost_b || !lost_c)
     {
@@ -848,7 +876,7 @@
   dbus_bus_add_match (f->recipient, "type='signal'", &f->e);
   test_assert_no_error (&f->e);
 
-  become_monitor (f);
+  become_monitor (f, NULL);
 
   m = dbus_message_new_signal ("/foo", "com.example.bar", "BroadcastSignal1");
   dbus_connection_send (f->sender, m, NULL);
@@ -896,7 +924,7 @@
   dbus_bus_add_match (f->recipient, "type='signal'", &f->e);
   test_assert_no_error (&f->e);
 
-  become_monitor (f);
+  become_monitor (f, NULL);
 
   m = dbus_message_new_signal ("/foo", "com.example.CannotSend",
       "BroadcastSignal1");
@@ -959,7 +987,7 @@
   if (f->address == NULL)
     return;
 
-  become_monitor (f);
+  become_monitor (f, NULL);
 
   m = dbus_message_new_signal ("/foo", "com.example.bar", "UnicastSignal1");
   if (!dbus_message_set_destination (m, f->recipient_name))
@@ -1010,7 +1038,7 @@
   if (f->address == NULL)
     return;
 
-  become_monitor (f);
+  become_monitor (f, NULL);
 
   m = dbus_message_new_signal ("/foo", "com.example.CannotSend",
       "UnicastSignal1");
@@ -1079,7 +1107,7 @@
   if (f->address == NULL)
     return;
 
-  become_monitor (f);
+  become_monitor (f, NULL);
 
   /* regression test for
    * https://bugs.freedesktop.org/show_bug.cgi?id=90952 */
@@ -1134,7 +1162,7 @@
   if (f->address == NULL)
     return;
 
-  become_monitor (f);
+  become_monitor (f, NULL);
 
   m = dbus_message_new_method_call (f->recipient_name, "/foo",
       "com.example.CannotSend", "Call1");
@@ -1189,7 +1217,7 @@
   if (f->address == NULL)
     return;
 
-  become_monitor (f);
+  become_monitor (f, NULL);
 
   res = dbus_bus_request_name (f->sender, "com.example.Sender",
       DBUS_NAME_FLAG_DO_NOT_QUEUE, &f->e);
@@ -1266,7 +1294,7 @@
       "eavesdrop='true',interface='com.example.Tedious'", &f->e);
   test_assert_no_error (&f->e);
 
-  become_monitor (f);
+  become_monitor (f, NULL);
 
   m = dbus_message_new_signal ("/foo", "com.example.Interesting",
       "UnicastSignal1");
@@ -1309,6 +1337,129 @@
   g_assert (m == NULL);
 }
 
+static void
+test_well_known_destination (Fixture *f,
+    gconstpointer context)
+{
+  DBusMessage *m;
+
+  if (f->address == NULL)
+    return;
+
+  take_well_known_name (f, f->recipient, "com.example.Recipient");
+  /* we don't expect_take_well_known_name here because the
+   * monitor isn't up yet */
+
+  become_monitor (f, NULL);
+
+  /* The sender sends a message to itself. It will not be observed. */
+  m = dbus_message_new_signal ("/foo", "com.example.bar", "Unobserved");
+  if (!dbus_message_set_destination (m, f->sender_name))
+    g_error ("OOM");
+  dbus_connection_send (f->sender, m, NULL);
+  dbus_message_unref (m);
+
+  /* The sender sends a message to the recipient by well-known name.
+   * It will be observed. */
+  m = dbus_message_new_signal ("/foo", "com.example.bar", "Observed1");
+  if (!dbus_message_set_destination (m, "com.example.Recipient"))
+    g_error ("OOM");
+  dbus_connection_send (f->sender, m, NULL);
+  dbus_message_unref (m);
+
+  /* The sender sends a message to the recipient by unique name.
+   * It will still be observed. */
+  m = dbus_message_new_signal ("/foo", "com.example.bar", "Observed2");
+  if (!dbus_message_set_destination (m, f->recipient_name))
+    g_error ("OOM");
+  dbus_connection_send (f->sender, m, NULL);
+  dbus_message_unref (m);
+
+  while (g_queue_get_length (&f->monitored) < 2)
+    test_main_context_iterate (f->ctx, TRUE);
+
+  m = g_queue_pop_head (&f->monitored);
+  assert_signal (m, f->sender_name, "/foo", "com.example.bar",
+      "Observed1", "", "com.example.Recipient");
+  dbus_message_unref (m);
+
+  m = g_queue_pop_head (&f->monitored);
+  assert_signal (m, f->sender_name, "/foo", "com.example.bar",
+      "Observed2", "", f->recipient_name);
+  dbus_message_unref (m);
+
+  m = g_queue_pop_head (&f->monitored);
+  g_assert (m == NULL);
+}
+
+static void
+test_unique_destination (Fixture *f,
+    gconstpointer context)
+{
+  DBusMessage *m;
+  Config config = {
+    NULL,
+    NULL, /* match rules */
+    FALSE
+  };
+  const gchar *match_rules[2] = { NULL, NULL };
+  gchar *rule;
+
+  if (f->address == NULL)
+    return;
+
+  take_well_known_name (f, f->recipient, "com.example.Recipient");
+  /* we don't expect_take_well_known_name here because the
+   * monitor isn't up yet */
+
+  rule = g_strdup_printf ("destination='%s'", f->recipient_name);
+  /* free it later */
+  g_test_queue_free (rule);
+  match_rules[0] = rule;
+  config.match_rules = match_rules;
+
+  become_monitor (f, &config);
+
+  /* The sender sends a message to itself. It will not be observed. */
+  m = dbus_message_new_signal ("/foo", "com.example.bar", "Unobserved");
+  if (!dbus_message_set_destination (m, f->sender_name))
+    g_error ("OOM");
+  dbus_connection_send (f->sender, m, NULL);
+  dbus_message_unref (m);
+
+  /* The sender sends a message to the recipient by well-known name.
+   * It will be observed. */
+  m = dbus_message_new_signal ("/foo", "com.example.bar", "Observed1");
+  if (!dbus_message_set_destination (m, "com.example.Recipient"))
+    g_error ("OOM");
+  dbus_connection_send (f->sender, m, NULL);
+  dbus_message_unref (m);
+
+  /* The sender sends a message to the recipient by unique name.
+   * It will still be observed. */
+  m = dbus_message_new_signal ("/foo", "com.example.bar", "Observed2");
+  if (!dbus_message_set_destination (m, f->recipient_name))
+    g_error ("OOM");
+  dbus_connection_send (f->sender, m, NULL);
+  dbus_message_unref (m);
+
+  while (g_queue_get_length (&f->monitored) < 2)
+    test_main_context_iterate (f->ctx, TRUE);
+
+  m = g_queue_pop_head (&f->monitored);
+  assert_signal (m, f->sender_name, "/foo", "com.example.bar",
+      "Observed1", "", "com.example.Recipient");
+  dbus_message_unref (m);
+
+  m = g_queue_pop_head (&f->monitored);
+  assert_signal (m, f->sender_name, "/foo", "com.example.bar",
+      "Observed2", "", f->recipient_name);
+  dbus_message_unref (m);
+
+  m = g_queue_pop_head (&f->monitored);
+  g_assert (m == NULL);
+}
+
 #ifdef DBUS_UNIX
 /* currently only used for the systemd activation test */
 static void
@@ -1339,20 +1490,6 @@
 
 /* currently only used for the systemd activation test */
 static void
-take_well_known_name (Fixture *f,
-    DBusConnection *connection,
-    const char *name)
-{
-  int ret;
-
-  ret = dbus_bus_request_name (connection, name,
-      DBUS_NAME_FLAG_DO_NOT_QUEUE, &f->e);
-  test_assert_no_error (&f->e);
-  g_assert_cmpint (ret, ==, DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER);
-}
-
-/* currently only used for the systemd activation test */
-static void
 expect_take_well_known_name (Fixture *f,
     DBusConnection *connection,
     const char *name)
@@ -1392,7 +1529,7 @@
   if (f->address == NULL)
     return;
 
-  become_monitor (f);
+  become_monitor (f, NULL);
 
   /* The sender sends a message to an activatable service. */
   m = dbus_message_new_signal ("/foo", "com.example.bar", "UnicastSignal1");
@@ -1666,6 +1803,12 @@
       setup, test_dbus_daemon, teardown);
   g_test_add ("/monitor/selective", Fixture, &selective_config,
       setup, test_selective, teardown);
+  g_test_add ("/monitor/well-known-destination",
+      Fixture, &well_known_destination_config,
+      setup, test_well_known_destination, teardown);
+  g_test_add ("/monitor/unique-destination",
+      Fixture, NULL,
+      setup, test_unique_destination, teardown);
   g_test_add ("/monitor/wildcard", Fixture, &wildcard_config,
       setup, test_unicast_signal, teardown);
   g_test_add ("/monitor/no-rule", Fixture, &no_rules_config,
diff -Nru dbus-1.10.22/tools/dbus-send.c dbus-1.10.24/tools/dbus-send.c
--- dbus-1.10.22/tools/dbus-send.c	2015-09-30 15:48:40.000000000 +0100
+++ dbus-1.10.24/tools/dbus-send.c	2017-09-25 16:20:08.000000000 +0100
@@ -464,6 +464,7 @@
       DBusMessageIter container_iter;
 
       type = DBUS_TYPE_INVALID;
+      secondary_type = DBUS_TYPE_INVALID;
       arg = argv[i++];
       c = strchr (arg, ':');
 
@@ -544,6 +545,7 @@
 	}
       else if (container_type == DBUS_TYPE_DICT_ENTRY)
 	{
+	  _dbus_assert (secondary_type != DBUS_TYPE_INVALID);
 	  append_dict (target_iter, type, secondary_type, c);
 	}
       else

--- End Message ---
--- Begin Message ---
Version: 9.3

Hi,

Each of the updates referenced in these bugs was included in this
morning's stretch point release. Thanks!

Regards,

Adam

--- End Message ---

Reply to: