numam-spdk/lib/env_dpdk
Dariusz Stojaczyk 33ccbba438 env/dpdk: add security checks to spdk_env_get_socket_id()
The underlying DPDK function we use reads an array
at the provided index without checking for any out
of bounds access. The array is RTE_MAX_LCORE elements
long, so always manually check against that to keep
our APIs safe.

This fixes potential crashes with lcore == SPDK_ENV_LCORE_ID_ANY

Change-Id: I3081b888275fbecba8ab95feb20d2074341e2fc7
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/425042
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-10 17:23:39 +00:00
..
env_internal.h env_dpdk: track PCI devices internally for vtophys 2018-04-02 14:03:05 -04:00
env.c env: introduce spdk_memzone_reserve_aligned 2018-07-02 19:13:23 +00:00
env.mk build: remove DPDK_DIR 2018-09-07 16:01:28 +00:00
init.c eal: add dpdk cl-arg no-shconf 2018-08-17 21:02:48 +00:00
Makefile env: add pci_virtio.c 2017-09-26 14:28:24 -04:00
memory.c env_dpdk: fix mem_map translation for sizes >2MB 2018-07-06 22:36:22 +00:00
pci_ioat.c env: register PMDs on associated first probe 2017-03-06 12:44:34 -07:00
pci_nvme.c dpdk/pci: support DPDK 18.08 write combined PCI resources 2018-08-15 17:43:30 +00:00
pci_virtio.c dpdk/pci: support DPDK 18.08 write combined PCI resources 2018-08-15 17:43:30 +00:00
pci.c env: remove deprecated spdk_pci_get_device() 2018-05-10 19:40:22 +00:00
threads.c env/dpdk: add security checks to spdk_env_get_socket_id() 2018-09-10 17:23:39 +00:00
vtophys.c env_dpdk: Include get_iommu_class after v17.08 2018-09-05 19:48:22 +00:00