net/sfc/base: fix out of bounds read when dereferencing sdup
authorGautam Dawar <gdawar@solarflare.com>
Mon, 10 Sep 2018 09:33:22 +0000 (10:33 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 27 Sep 2018 23:41:02 +0000 (01:41 +0200)
commited42d18458cbdceb28f006fda9967141a7e79b92
tree3cf569933dedf024951c5cfeff3d4290e36f24b8
parentb2fe569359dd75a00801e60b8beb25b5bba54c62
net/sfc/base: fix out of bounds read when dereferencing sdup

Introduce and use macro to make sure that MCDI buffers allocated
on stack are rounded up properly.

Fixes: 6f619653b9b1 ("net/sfc/base: import MCDI implementation")
Fixes: f7dc06bf35f2 ("net/sfc/base: import 5xxx/6xxx family support")
Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
Fixes: 1dae25112a54 ("net/sfc/base: import built-in selftest")
Fixes: 0a7864349106 ("net/sfc/base: import PHY statistics")
Fixes: 8c7c723dfe7c ("net/sfc/base: import MAC statistics")
Fixes: 5935cd8c47d3 ("net/sfc/base: import RSS support")
Fixes: 9ee64bd404fc ("net/sfc/base: import loopback control")
Fixes: dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI")
Fixes: d96a34d165b1 ("net/sfc/base: import NVRAM support")
Fixes: 05fce2ce8451 ("net/sfc/base: import libefx licensing")
Fixes: ba6afee9a81e ("net/sfc/base: add advanced function to extract FW version")
Fixes: c7815c1d1f20 ("net/sfc/base: use proper MCDI command for encap filters")
Fixes: 17551f6dffcc ("net/sfc/base: add API to control UDP tunnel ports")
Fixes: eff9b666eae5 ("net/sfc/base: move RxDP config get to EF10 NIC code")
Fixes: 4aab7f07a645 ("net/sfc/base: refactor EF10 get datapath capabilities")
Fixes: 480a13044b8b ("net/sfc/base: support FW subvariant choice")
Fixes: 6f60cc4a78b6 ("net/sfc/base: support equal stride super-buffer Rx mode")
Fixes: 9a733758c046 ("net/sfc/base: support MARK and FLAG actions in filters")
Cc: stable@dpdk.org
Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
19 files changed:
drivers/net/sfc/base/ef10_ev.c
drivers/net/sfc/base/ef10_filter.c
drivers/net/sfc/base/ef10_intr.c
drivers/net/sfc/base/ef10_mac.c
drivers/net/sfc/base/ef10_nic.c
drivers/net/sfc/base/ef10_phy.c
drivers/net/sfc/base/ef10_rx.c
drivers/net/sfc/base/ef10_tx.c
drivers/net/sfc/base/efx_lic.c
drivers/net/sfc/base/efx_mcdi.c
drivers/net/sfc/base/efx_mcdi.h
drivers/net/sfc/base/efx_nic.c
drivers/net/sfc/base/efx_nvram.c
drivers/net/sfc/base/efx_tunnel.c
drivers/net/sfc/base/mcdi_mon.c
drivers/net/sfc/base/siena_mac.c
drivers/net/sfc/base/siena_nic.c
drivers/net/sfc/base/siena_nvram.c
drivers/net/sfc/base/siena_phy.c