[Bug 23115] New: Crashes if 'account' parameter is too long.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Aug 3 19:57:18 CEST 2009


http://bugs.freedesktop.org/show_bug.cgi?id=23115

           Summary: Crashes if 'account' parameter is too long.
           Product: Telepathy
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: medium
         Component: telepathy-gabble
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: will.thompson at collabora.co.uk


The Connection object's bus name is derived from the 'account' parameter. If
you have a ridiculously long account name, gabble gives tp-glib a unique name
that makes the Connection's bus name longer than 255 characters, and tp-glib
criticals.

JIDs can be up to 3071 bytes[1], so we can't just reject ridiculously long
JIDs. Maybe we can do something like, "if the bus name will be too long, hash
the jid, else, use the mangled jid".

tp-glib should probably complain sooner if the CM is going to hit this.

[1] http://tools.ietf.org/html/rfc3920#section-3

tp-glib-CRITICAL **: tp_dbus_daemon_request_name: assertion
`tp_dbus_check_valid_bus_name (well_known_name, TP_DBUS_NAME_TYPE_WELL_KNOWN,
error)' failed
aborting...

#4  0x00007ffff6a8107a in tp_dbus_daemon_request_name (self=0x6cc8f0, 
    well_known_name=0x9afb10
"org.freedesktop.Telepathy.Connection.gabble.jabber.", 'a' <repeats 149
times>..., idempotent=0, error=0x7fffffffdb60)
    at dbus.c:1084
        dbc = <value optimized out>
        dbus_error = {name = 0x9af740 "\260l\302\365\377\177", 
          message = 0x7ffff5c26a00 "", dummy1 = 0, dummy2 = 0, dummy3 = 0, 
          dummy4 = 0, dummy5 = 1, padding1 = 0x9af740}
        result = <value optimized out>
        invalidated = <value optimized out>
        __PRETTY_FUNCTION__ = "tp_dbus_daemon_request_name"
#5  0x00007ffff6a30fbc in tp_base_connection_register (self=0x6de310, 
    cm_name=0x484923 "gabble", bus_name=0x7fffffffdb70, 
    object_path=0x7fffffffdb68, error=0x7fffffffdb60) at base-connection.c:1542
        priv = 0x6de450
        tmp = <value optimized out>
        safe_proto = 0x6f26d0 "\220j\302\365\377\177"
        unique_name = 0x9af740 "\260l\302\365\377\177"
        __PRETTY_FUNCTION__ = "tp_base_connection_register"
#6  0x00007ffff6a3677d in tp_base_connection_manager_request_connection (
    iface=<value optimized out>, proto=0x9c2ad0 "jabber", parameters=0x6ee590, 
    context=0x6ef9b0) at base-connection-manager.c:926
        self = 0x6d1000
        priv = 0x6d1030
        conn = <value optimized out>
        bus_name = <value optimized out>
        object_path = <value optimized out>
        error = 0x6c0530
        params = 0x6d3980
        params_present = 0x6e5020
        protospec = 0x6b6040
        set_param = 0x7ffff6a35640 <tp_cm_param_setter_offset>
        __PRETTY_FUNCTION__ = "tp_base_connection_manager_request_connection"

(gdb) print strlen (well_known_name)
$2 = 368


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the telepathy-bugs mailing list