DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/e1000: fix out of bounds access
@ 2017-07-25 12:19 Kuba Kozak
  2017-07-25 13:24 ` Lu, Wenzhuo
  0 siblings, 1 reply; 5+ messages in thread
From: Kuba Kozak @ 2017-07-25 12:19 UTC (permalink / raw)
  To: wenzhuo.lu; +Cc: dev, deepak.k.jain, michalx.k.jastrzebski, Kuba Kozak, stable

Fix wrong structure type used as argument
in memset() call.

Coverity issue: 147223
Coverity issue: 147227
Fixes: a8600af43738 ("net/igb: parse flow API ethertype filter")
Fixes: 22bb13410cb2 ("net/igb: create consistent filter")
Cc: stable@dpdk.org

Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
---
 drivers/net/e1000/igb_flow.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c
index db73b18..ed2ecc4 100644
--- a/drivers/net/e1000/igb_flow.c
+++ b/drivers/net/e1000/igb_flow.c
@@ -694,7 +694,8 @@ igb_parse_ethertype_filter(struct rte_eth_dev *dev,
 
 	if (hw->mac.type == e1000_82576) {
 		if (filter->queue >= IGB_MAX_RX_QUEUE_NUM_82576) {
-			memset(filter, 0, sizeof(struct rte_eth_ntuple_filter));
+			memset(filter, 0, sizeof(
+					struct rte_eth_ethertype_filter));
 			rte_flow_error_set(error, EINVAL,
 				RTE_FLOW_ERROR_TYPE_ITEM,
 				NULL, "queue number not supported "
@@ -703,7 +704,8 @@ igb_parse_ethertype_filter(struct rte_eth_dev *dev,
 		}
 	} else {
 		if (filter->queue >= IGB_MAX_RX_QUEUE_NUM) {
-			memset(filter, 0, sizeof(struct rte_eth_ntuple_filter));
+			memset(filter, 0, sizeof(
+					struct rte_eth_ethertype_filter));
 			rte_flow_error_set(error, EINVAL,
 				RTE_FLOW_ERROR_TYPE_ITEM,
 				NULL, "queue number not supported "
-- 
2.7.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-31 12:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-25 12:19 [dpdk-dev] [PATCH] net/e1000: fix out of bounds access Kuba Kozak
2017-07-25 13:24 ` Lu, Wenzhuo
2017-07-25 13:35   ` Jastrzebski, MichalX K
2017-07-25 14:04     ` Lu, Wenzhuo
2017-07-31 12:06   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit

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).