ipc: harden message receive
authorAnatoly Burakov <anatoly.burakov@intel.com>
Mon, 29 Apr 2019 14:22:50 +0000 (15:22 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 3 May 2019 12:30:49 +0000 (14:30 +0200)
commit7b51d1b162914e37bcc511a11efcfbabb44b2eb3
treec01818c7bf4fafa624f51b99b7b8f6341ac56ee5
parent535113907f23134375b18f40b6642a963ec50141
ipc: harden message receive

Currently, IPC does not check received messages for invalid data
and passes them to user code unchanged. This may result in buffer
overruns on reading message data. Fix this by checking the message
length and fd number on receive, and discard any messages that
are not valid.

Fixes: bacaa2754017 ("eal: add channel for multi-process communication")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/common/eal_common_proc.c