Go to file
Maxime Coquelin c78d94189d vhost: fix vring index check
vhost_user_check_and_alloc_queue_pair() is used to extract
a vring index from a payload. This function validates the
index and is called early on in when performing message
handling. Most message handlers depend on it correctly
validating the vring index.

Depending on the message type the vring index is in
different parts of the payload. The function contains a
switch/case for each type and copies the index. This is
stored in a uint16. This index is then validated. Depending
on the message, the source index is an unsigned int. If
integer truncation occurs (uint->uint16) the top 16 bits
of the index are never validated.

When they are used later on  (e.g. in
vhost_user_set_vring_num() or vhost_user_set_vring_addr())
it can lead to out of bound indexing. The out of bound
indexed data gets written to, and hence this can cause
memory corruption.

This patch fixes this vulnerability by declaring vring
index as an unsigned int in
vhost_user_check_and_alloc_queue_pair().

CVE-2020-10723
Fixes: 160cbc815b ("vhost: remove a hack on queue allocation")
Cc: stable@dpdk.org

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Reviewed-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
2020-05-18 15:18:58 +02:00
.ci ci: reduce examples in static builds 2020-04-17 23:34:08 +02:00
app test/crypto: fix statistics case 2020-05-17 16:10:29 +02:00
buildtools build: add internal tag check 2020-04-25 17:01:01 +02:00
config build: disable gcc 10 zero-length-bounds warning 2020-05-18 13:54:36 +02:00
devtools cryptodev: fix ABI compatibility for ChaCha20-Poly1305 2020-05-11 13:17:43 +02:00
doc crypto/virtio: enable OOP feature flag 2020-05-17 16:10:44 +02:00
drivers crypto/virtio: enable OOP feature flag 2020-05-17 16:10:44 +02:00
examples examples: remove extra new line after link duplex 2020-05-12 04:07:29 +02:00
kernel eal: move OS-specific sub-directories 2020-03-31 13:08:55 +02:00
lib vhost: fix vring index check 2020-05-18 15:18:58 +02:00
license eal: move OS-specific sub-directories 2020-03-31 13:08:55 +02:00
mk build: disable gcc 10 zero-length-bounds warning 2020-05-18 13:54:36 +02:00
usertools raw/ioat: support ICX 2020-05-11 17:18:58 +02:00
.editorconfig devtools: add EditorConfig file 2020-02-22 21:05:22 +01:00
.gitattributes improve git diff 2016-11-13 15:25:12 +01:00
.gitignore doc: add feature matrix table for bbdev 2020-04-19 22:34:26 +02:00
.travis.yml ci: fix telemetry dependency in Travis 2020-04-10 10:03:22 +02:00
ABI_VERSION version: 20.05-rc0 2020-02-27 12:02:19 +01:00
GNUmakefile test: move to app directory 2019-02-26 15:29:27 +01:00
MAINTAINERS test/ipsec: add performance cases 2020-05-11 13:17:43 +02:00
Makefile remove blank lines at end of file 2019-11-26 00:12:08 +01:00
meson_options.txt trace: introduce new subsystem 2020-04-23 15:39:06 +02:00
meson.build build: add arch-specific header path to global includes 2020-05-10 23:45:02 +02:00
README license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00
VERSION version: 20.05-rc2 2020-05-12 04:09:20 +02:00

DPDK is a set of libraries and drivers for fast packet processing.
It supports many processor architectures and both FreeBSD and Linux.

The DPDK uses the Open Source BSD-3-Clause license for the core libraries
and drivers. The kernel components are GPL-2.0 licensed.

Please check the doc directory for release notes,
API documentation, and sample application information.

For questions and usage discussions, subscribe to: users@dpdk.org
Report bugs and issues to the development mailing list: dev@dpdk.org