Skip to content
Commit 57ed0a7a authored by Ben Wolsieffer's avatar Ben Wolsieffer Committed by Alberto Escolar
Browse files

logging: multidomain_link: fix crash caused by drop notification



The remote domain may send unsolicited Z_LOG_MULTIDOMAIN_ID_DROPPED IPC
messages, which are not handled in log_multidomain_link_on_recv_cb().
With CONFIG_ASSERT=y, this will cause an assertion failure. With asserts
disabled, this message would be treated as a reply to any in progress
request and cause getter_msg_process() to return early. In turn, this
can cause various kinds of memory corruption when the real reply arrives
and the callback reads/writes stack variables that are no longer valid.

Fix this by explicitly ignoring Z_LOG_MULTIDOMAIN_ID_DROPPED, and also
don't treat unrecognized message types as replies.

Signed-off-by: default avatarBen Wolsieffer <benwolsieffer@gmail.com>
parent 7f115412
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment