aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-08-11 15:59:35 -0500
committerDan Williams <dcbw@redhat.com>2010-08-11 15:59:35 -0500
commit5388cf396e768e7c7d1b57f2c4fe67dc448d536f (patch)
treef88fee94af55f47b5438e8484aa76741bafd82f2 /src/main.c
parentbe28089dc4c1b07d9def45a3c763f432ae8322c4 (diff)
core: work around dbus-glib property access bug (CVE-2010-1172) (rh #585394)
More info: https://bugzilla.redhat.com/show_bug.cgi?id=585394 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-1172 dbus-glib was not properly enforcing the 'access' permissions on object properties exported using its API. There were 2 specific bugs: 1) dbus-glib did not enforce the introspection read/write property permissions, so if the GObject property definition allowed write access (which is sometimes desirable), D-Bus clients could modify that value even if the introspection said it was read-only 2) dbus-glib was not filtering out GObject properties that were not listed in the introspection XML. Thus, if the GObject defined more properties than were listed in the introspection XML (which is also often useful, and MM uses this quite a bit) those properties would also be exposed to D-Bus clients. To fix this completely, you need to: 1) get dbus-glib master when the patch is commited, OR grab the patch from https://bugzilla.redhat.com/show_bug.cgi?id=585394 and build a new dbus-glib 2) rebuild ModemManager against the new dbus-glib
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 72fa6dc4..2b4da21d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -196,6 +196,17 @@ main (int argc, char *argv[])
return -1;
}
+#ifndef HAVE_DBUS_GLIB_DISABLE_LEGACY_PROP_ACCESS
+#error HAVE_DBUS_GLIB_DISABLE_LEGACY_PROP_ACCESS not defined
+#endif
+
+#if HAVE_DBUS_GLIB_DISABLE_LEGACY_PROP_ACCESS
+ /* Ensure that non-exported properties don't leak out, and that the
+ * introspection 'access' permissions are respected.
+ */
+ dbus_glib_global_set_disable_legacy_property_access ();
+#endif
+
proxy = create_dbus_proxy (bus);
if (!proxy)
return -1;