vhost/crypto: fix possible out of bound access
authorFan Zhang <roy.fan.zhang@intel.com>
Fri, 4 Jan 2019 11:22:46 +0000 (11:22 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 Jan 2019 16:44:29 +0000 (17:44 +0100)
commit16d2e718b8ce7b775cd9118e6256dbad081433c3
treee090743f90ff1bf8c62b3e1c53905323de113bc8
parentc7e7244b82ad174a8ca51a385e6ad2eb508261d8
vhost/crypto: fix possible out of bound access

This patch fixes a out of bound access possbility in vhost
crypto. Originally the incorrect next descriptor index may
cause the library read invalid memory content and crash
the application.

Fixes: 3bb595ecd682 ("vhost/crypto: add request handler")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vhost_crypto.c