Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-130304

QDBusMessage::createMethodCall with a bad "service" argument crashes in libdbus-1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.5.8, 6.8.1, 6.9.0 FF
    • 6.8.0
    • D-Bus
    • None
    • libdbus: 1.14.10
    • Linux/Wayland
    • f42f5b561 (dev), 7955c58bc (6.8), de8bdcd22 (tqtc/lts-6.5)

    Description

      The following code crashes in libdbus-1: 

      QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("receiver"), QStringLiteral("/path"), QStringLiteral("some.interface"), QStringLiteral("method"));
      const QDBusPendingCall call = QDBusConnection::sessionBus().asyncCall(message);
      

      Presumably because libdbus-1 has stricter check on the "service" parameter. And on check failure, it calls `abort()`.

      Perhaps Qt could also call functions in  https://dbus.freedesktop.org/doc/api/html/group__DBusSyntax.html when validating parameters, to ensure any bad arguments won't crash the application, but return errors as specified in the API document.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            genericity Jin Liu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: