Skip to contentSkip to conversation

net/ice: fix potential null pointer dereferences

PATCH Applied Xiaolong Ye 2 participants 2 messages Aug 5, 2019 – Aug 6, 2019 1 message not in the archive Network drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): “[email protected]”

#1 lore raw

PATCH v2 1/1 net/ice: fix potential null pointer dereferences

This patch fixes two null pointer dereferences in flow code detected by coverity scan.

Coverity issue: 345815, 345816

Fixes 94f00800d78b ("net/ice: fix VXLAN/NVGRE flow matching")

---
v2 change:

- add coverity ids

 drivers/net/ice/ice_generic_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ice/ice_generic_flow.c +2 -2
index 5fcf4289c..1c0adc779 100644
@@ -464,7 +464,7 @@ static uint64_t ice_get_flow_field(const struct rte_flow_item pattern[],
 					   "Invalid VXLAN item");
 				return 0;
 			}
-			if (vxlan_mask->vni[0] == UINT8_MAX &&
+			if (vxlan_mask && vxlan_mask->vni[0] == UINT8_MAX &&
 					vxlan_mask->vni[1] == UINT8_MAX &&
 					vxlan_mask->vni[2] == UINT8_MAX)
 				input_set |= ICE_INSET_TUN_ID;
@@ -486,7 +486,7 @@ static uint64_t ice_get_flow_field(const struct rte_flow_item pattern[],
 					   "Invalid NVGRE item");
 				return 0;
 			}
-			if (nvgre_mask->tni[0] == UINT8_MAX &&
+			if (nvgre_mask && nvgre_mask->tni[0] == UINT8_MAX &&
 					nvgre_mask->tni[1] == UINT8_MAX &&
 					nvgre_mask->tni[2] == UINT8_MAX)
 				input_set |= ICE_INSET_TUN_ID;
Signature · 1 line
2.17.1
Acked-by on v2 1/1 Applied
#2 lore raw
Quoted 11 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Xiaolong Ye
Sent: Monday, August 5, 2019 5:15 PM
To: Yang, Qiming <[email protected]>; Lu, Wenzhuo <[email protected]>
Cc: [email protected]; Ye, Xiaolong <[email protected]>; Wang, Ying A <[email protected]>
Subject: [dpdk-dev] [PATCH v2] net/ice: fix potential null pointer dereferences

Quoted 8 lines

This patch fixes two null pointer dereferences in flow code detected by coverity scan.

Coverity issue: 345815, 345816

Fixes 94f00800d78b ("net/ice: fix VXLAN/NVGRE flow matching")

Applied to dpdk-next-net-intel.

Thanks
Qi