aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Rybchenko <arybchik@FreeBSD.org>2018-11-23 07:50:34 +0000
committerAndrew Rybchenko <arybchik@FreeBSD.org>2018-11-23 07:50:34 +0000
commit454502b9f1a27320d8568dd55e5e10b945694ff2 (patch)
tree556ca2f054301cd7850661bca3dab6999a54de95
parent8302d100a08cff4b5fb5fca2f9d67da4a4745d53 (diff)
downloadsrc-454502b9f1a27320d8568dd55e5e10b945694ff2.tar.gz
src-454502b9f1a27320d8568dd55e5e10b945694ff2.zip
sfxge(4): fix out of bounds read in VIs allocation
Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18068
Notes
Notes: svn path=/head/; revision=340798
-rw-r--r--sys/dev/sfxge/common/ef10_nic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/sfxge/common/ef10_nic.c b/sys/dev/sfxge/common/ef10_nic.c
index a149710cb849..1df2fe010123 100644
--- a/sys/dev/sfxge/common/ef10_nic.c
+++ b/sys/dev/sfxge/common/ef10_nic.c
@@ -504,7 +504,7 @@ efx_mcdi_alloc_vis(
{
efx_mcdi_req_t req;
uint8_t payload[MAX(MC_CMD_ALLOC_VIS_IN_LEN,
- MC_CMD_ALLOC_VIS_OUT_LEN)];
+ MC_CMD_ALLOC_VIS_EXT_OUT_LEN)];
efx_rc_t rc;
if (vi_countp == NULL) {
@@ -517,7 +517,7 @@ efx_mcdi_alloc_vis(
req.emr_in_buf = payload;
req.emr_in_length = MC_CMD_ALLOC_VIS_IN_LEN;
req.emr_out_buf = payload;
- req.emr_out_length = MC_CMD_ALLOC_VIS_OUT_LEN;
+ req.emr_out_length = MC_CMD_ALLOC_VIS_EXT_OUT_LEN;
MCDI_IN_SET_DWORD(req, ALLOC_VIS_IN_MIN_VI_COUNT, min_vi_count);
MCDI_IN_SET_DWORD(req, ALLOC_VIS_IN_MAX_VI_COUNT, max_vi_count);