vhost: validate index in guest notification API
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Mon, 19 Oct 2020 17:34:11 +0000 (19:34 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:24:26 +0000 (23:24 +0100)
commit366374054b656e049188216e2fa44831749c2a21
treea400f5eed0f9fbfd694706675c4b4aee1db9bd14
parent8c042f8191f8337da30958d0f622776861e417a5
vhost: validate index in guest notification API

This patch validates the queue index parameter, in order
to ensure neither out-of-bound accesses nor NULL pointer
dereferencing happen.

Fixes: 9eed6bfd2efb ("vhost: allow to enable or disable features")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
lib/librte_vhost/vhost.c