vhost: fix potential memory space leak
authorXiaolong Ye <xiaolong.ye@intel.com>
Mon, 18 May 2020 13:17:03 +0000 (14:17 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 18 May 2020 13:22:42 +0000 (15:22 +0200)
commit549de54c4f9fd36b2b11f3df7e81bf2567a2d526
tree2e73132dde5d76ad777034b52226d834a3b38019
parent97ecc1c85c95c13bc66a87435758e93406c35c48
vhost: fix potential memory space leak

A malicious container which has direct access to the vhost-user socket
can keep sending VHOST_USER_GET_INFLIGHT_FD messages which may cause
leaking resources until resulting a DOS. Fix it by unmapping the
dev->inflight_info->addr before assigning new mapped addr to it.

CVE-2020-10726
Fixes: d87f1a1cb7b6 ("vhost: support inflight info sharing")
Cc: stable@dpdk.org
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vhost_user.c