git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e282bc
)
vhost: fix possible out of bound access in vector filling
author
Tiwei Bie
<tiwei.bie@intel.com>
Fri, 4 Jan 2019 04:06:40 +0000
(12:06 +0800)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Mon, 14 Jan 2019 16:44:29 +0000
(17:44 +0100)
Fixes:
7f74b95c444f
("vhost: pre update used ring for Tx and Rx")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/virtio_net.c
patch
|
blob
|
history
diff --git
a/lib/librte_vhost/virtio_net.c
b/lib/librte_vhost/virtio_net.c
index
474acf6
..
d64c355
100644
(file)
--- a/
lib/librte_vhost/virtio_net.c
+++ b/
lib/librte_vhost/virtio_net.c
@@
-312,6
+312,9
@@
fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
struct vring_desc *descs = vq->desc;
struct vring_desc *idesc = NULL;
+ if (unlikely(idx >= vq->size))
+ return -1;
+
*desc_chain_head = idx;
if (vq->desc[idx].flags & VRING_DESC_F_INDIRECT) {