Bug 27799 - [PATCH] don't pass invalid error interfaces to libdbus
Summary: [PATCH] don't pass invalid error interfaces to libdbus
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: GLib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Colin Walters
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-22 13:29 UTC by Dan Williams
Modified: 2010-04-26 14:54 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
don't pass bad interfaces to libdbus (4.02 KB, patch)
2010-04-22 13:30 UTC, Dan Williams
Details | Splinter Review

Description Dan Williams 2010-04-22 13:29:54 UTC
While clients should really register their errors, dbus-glib
shouldn't be passing a malformed error interface to dbus
either.  It's just not nice and libdbus will call abort().

See https://bugzilla.redhat.com/show_bug.cgi?id=581794
Comment 1 Dan Williams 2010-04-22 13:30:30 UTC
Created attachment 35242 [details] [review]
don't pass bad interfaces to libdbus
Comment 2 Dan Williams 2010-04-22 13:31:26 UTC
Stacktrace from this bug is something like:

NetworkManager: #8  0x00f0b78a in abort () from /lib/libc.so.6
NetworkManager: #9  0x00349c15 in _dbus_abort () at dbus-sysdeps.c:88
NetworkManager: #10 0x00345446 in _dbus_warn_check_failed (
NetworkManager:     format=0x353500 "arguments to %s() were incorrect, assertion \"%s\" failed in file %s line %d.\nThis is normally a bug in some application using the D-Bus library.\n") at dbus-internals.c:283
NetworkManager: #11 0x00339216 in dbus_message_new_error (reply_to=0x863e578, 
NetworkManager:     error_name=0x8611f78 "org.freedesktop.DBus.GLib.UnmappedError..Code0", 
NetworkManager:     error_message=0x8638600 "ifcfg file '/etc/sysconfig/network-scripts/ifcfg-lo' unknown")
NetworkManager: 10
NetworkManager: #12 0x00c9429e in gerror_to_dbus_error_message (object_info=<value optimized out>, message=0x863e578, 
NetworkManager:     error=0x863b270) at dbus-gobject.c:1209
NetworkManager: #13 0x00c9525b in invoke_object_method (connection=0x8611b60, message=0x863e578, user_data=0x861fda0)
NetworkManager:     at dbus-gobject.c:1569

Note how dbus-glib tries to send "org.freedesktop.DBus.GLib.UnmappedError..Code0" to libdbus.
Comment 3 Colin Walters 2010-04-26 14:54:47 UTC
I'd rather call uscore_to_wincaps only if g_quark_to_string doesn't return NULL.  Actually rather than bounce this back I just did the change myself and pushed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.