From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
Tiwei Bie <tiwei.bie@intel.com>,
Zhihong Wang <zhihong.wang@intel.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 3/3] vhost: fix possible out of bound access
Date: Sun, 28 Oct 2018 01:08:46 +0000 [thread overview]
Message-ID: <20181028010846.81730-3-ferruh.yigit@intel.com> (raw)
In-Reply-To: <20181028010846.81730-1-ferruh.yigit@intel.com>
Fixes: d7280c9fffcb ("vhost: support selective datapath")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_vhost/vdpa.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/librte_vhost/vdpa.c b/lib/librte_vhost/vdpa.c
index c2c5dff1d..e7d849ee0 100644
--- a/lib/librte_vhost/vdpa.c
+++ b/lib/librte_vhost/vdpa.c
@@ -63,6 +63,9 @@ rte_vdpa_register_device(struct rte_vdpa_dev_addr *addr,
break;
}
+ if (i == MAX_VHOST_DEVICE)
+ return -1;
+
sprintf(device_name, "vdpa-dev-%d", i);
dev = rte_zmalloc(device_name, sizeof(struct rte_vdpa_device),
RTE_CACHE_LINE_SIZE);
--
2.17.2
next prev parent reply other threads:[~2018-10-28 0:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-28 1:08 [dpdk-dev] [PATCH 1/3] lib: fix shifting 32 bits signed variable 31 times Ferruh Yigit
2018-10-28 1:08 ` [dpdk-dev] [PATCH 2/3] service: fix possible NULL access Ferruh Yigit
2018-10-29 16:12 ` Van Haaren, Harry
2018-10-28 1:08 ` Ferruh Yigit [this message]
2018-10-31 17:28 ` [dpdk-dev] [PATCH 3/3] vhost: fix possible out of bound access Maxime Coquelin
2018-11-06 0:26 ` [dpdk-dev] [PATCH 1/3] lib: fix shifting 32 bits signed variable 31 times Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181028010846.81730-3-ferruh.yigit@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
--cc=tiwei.bie@intel.com \
--cc=zhihong.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).