Jami-daemon dies on wrong D-Bus input

Hi,

I tried to use muteLocalMedia(account,callid,mediatype,mute) via D-Bus probably with unacceptable values but it crashed jamid instead of spitting some error…

1 Like

This kind of problem needs to be solved by friends with technical expertise

It sounds like Jami’s jamid isn’t checking the D-Bus payload before it gets to the media layer.
If account or callid is invalid, or if mediatype is out of enum range, muteLocalMedia(account, callid, mediatype, mute) should definitely fail gracefully. When D-Bus input is bad, crashing usually means that

The D-Bus adaptor doesn’t check the types of missing arguments.

no validation of nullptr or lookup before dereferencing

or an exception that wasn’t handled rising up in the daemon

You can check by running jamid in the foreground with debug logs on and playing back the bad call. If it segfaults, it’s almost definitely because there isn’t a guard around the media lookup.
This is a bug, to be honest. D-Bus APIs should never trust what clients send them. They should send back an error message instead of shutting down the daemon. worth filing with exact parameters and a backtrace so that the D-Bus handler can do the right validation.

1 Like