eldbus: check message serial before using
authorShinwoo Kim <cinoo.kim@samsung.com>
Mon, 31 Jul 2017 06:50:48 +0000 (15:50 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 31 Jul 2017 06:53:58 +0000 (15:53 +0900)
commita238272f0067f3664dfc0178baecea57a234b15c
treeba760ed7314c275ce7332a96bde4b1927fb11f0c
parentca625aa323fcf3c40a660cf693fd30d1d737f13a
eldbus: check message serial before using

Summary:
Whatever the dbus_connection_send_with_reply returns, the serial value
should be checked, because if the seral value is invalid a process could be aborted.

There is backtrace as below.

The dbus_connection_send_with_reply could return TRUE
even though it has a problem. Please refer to following comment:

   /* Refuse to send fds on a connection that cannot handle
      them. Unfortunately we cannot return a proper error here, so
      the best we can do is return TRUE but leave *pending_return
      as NULL. */

Test Plan:
There is not a exact reproduce step. If the Tizen login manager is relaunched
repeatedly, then the dbus and other service processes are relaunched.
If a service process tries to use dbus when the dbus has problem as above,
then it could be possilbe to get above backtrace.

Reviewers: raster, zehortigoza

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5053

@fix
src/lib/eldbus/eldbus_pending.c