vhost: check for ring descriptors overflow
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Thu, 10 Mar 2016 04:32:45 +0000 (12:32 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 14 Mar 2016 23:05:59 +0000 (00:05 +0100)
commitc687b0b635e29c99f4dc7c91d84849130aeb89ac
tree62be07863db7f491af5166b3d8cb0f7a46151cd6
parent623bc47054d01415eebb0ec4a3c7e52b346f9d22
vhost: check for ring descriptors overflow

A malicious guest may easily forge some illegal vring desc buf.
To make our vhost robust, we need make sure desc->next will not
go beyond the vq->desc[] array.

Suggested-by: Rich Lane <rich.lane@bigswitch.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
lib/librte_vhost/vhost_rxtx.c