All of lore.kernel.org
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix out of bounds read issue
@ 2020-05-07  3:09 Chenxu Di
  2020-05-07  5:15 ` Ye Xiaolong
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Chenxu Di @ 2020-05-07  3:09 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, Chenxu Di

This patch fixes (out-of-bounds read) coverity issue.

Coverity issue: 357699
Coverity issue: 357694
Fixes: feaae285b342 ("net/i40e: support hash configuration in RSS flow")

Signed-off-by: Chenxu Di <chenxux.di@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 749d85f54..6c295ac5a 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -13180,7 +13180,7 @@ i40e_rss_config_hash_function(struct i40e_pf *pf,
 		}
 
 		for (j = I40E_FILTER_PCTYPE_INVALID + 1;
-		     j < I40E_FILTER_PCTYPE_MAX; j++) {
+		     j < I40E_FILTER_PCTYPE_MAX && i < UINT64_BIT; j++) {
 			if (pf->adapter->pctypes_tbl[i] & (1ULL << j))
 				i40e_write_global_rx_ctl(hw,
 					I40E_GLQF_HSYM(j),
@@ -13312,7 +13312,7 @@ i40e_rss_clear_hash_function(struct i40e_pf *pf,
 		}
 
 		for (j = I40E_FILTER_PCTYPE_INVALID + 1;
-		     j < I40E_FILTER_PCTYPE_MAX; j++) {
+		     j < I40E_FILTER_PCTYPE_MAX && i < UINT64_BIT; j++) {
 			if (pf->adapter->pctypes_tbl[i] & (1ULL << j))
 				i40e_write_global_rx_ctl(hw,
 					I40E_GLQF_HSYM(j),
-- 
2.17.1


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

end of thread, other threads:[~2020-05-15  3:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07  3:09 [dpdk-dev] [PATCH] net/i40e: fix out of bounds read issue Chenxu Di
2020-05-07  5:15 ` Ye Xiaolong
2020-05-07  5:55   ` Di, ChenxuX
2020-05-07  6:30     ` Ye Xiaolong
2020-05-07  9:49 ` [dpdk-dev] [PATCH v2] " Chenxu Di
2020-05-08  2:26   ` Yang, Qiming
2020-05-08  2:36     ` Ye Xiaolong
2020-05-08  2:54       ` Yang, Qiming
2020-05-13  2:26 ` [dpdk-dev] [PATCH v3] " Chenxu Di
2020-05-13  6:51   ` Jeff Guo
2020-05-14  1:16     ` Di, ChenxuX
2020-05-14  6:17       ` Jeff Guo
2020-05-14  6:41         ` Di, ChenxuX
2020-05-14  7:07 ` [dpdk-dev] [PATCH v4] " Chenxu Di
2020-05-14  9:07   ` Jeff Guo
2020-05-15  3:22   ` Ye Xiaolong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.