eldbus: check message serial before using 50/141550/2
authorShinwoo Kim <cinoo.kim@samsung.com>
Mon, 31 Jul 2017 06:50:48 +0000 (15:50 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Tue, 1 Aug 2017 04:34:33 +0000 (04:34 +0000)
commit8064339535b20b8729b1a74e1613126f79120de4
tree021e8c709caf23b31320e200c6da851d353026b6
parent93ee9230cafe7979c34cf46ba3c9433333aa98de
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

Change-Id: I4a6769e4f7154d0f95db4234f4a87e1f62ab0ab6
src/lib/eldbus/eldbus_pending.c