DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anoob Joseph <anoobj@marvell.com>
To: Akhil Goyal <akhil.goyal@nxp.com>
Cc: Anoob Joseph <anoobj@marvell.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	 Jerin Jacob <jerinj@marvell.com>,
	Narayana Prasad <pathreya@marvell.com>,
	Ankur Dwivedi <adwivedi@marvell.com>,
	Tejasree Kondoj <ktejasree@marvell.com>, <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH 1/6] common/octeontx2: fix out of bounds access
Date: Sat, 16 May 2020 14:56:53 +0530	[thread overview]
Message-ID: <1589621218-25339-2-git-send-email-anoobj@marvell.com> (raw)
In-Reply-To: <1589621218-25339-1-git-send-email-anoobj@marvell.com>

Coverity issue: 354230, 354231

Fixes: f44e71637755 ("net/octeontx2: add security session operations")
Fixes: 3fe4d07d1678 ("crypto/octeontx2: enable CPT to share QP with ethdev")

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 drivers/common/octeontx2/otx2_sec_idev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/octeontx2/otx2_sec_idev.c b/drivers/common/octeontx2/otx2_sec_idev.c
index 4e65ce2..6e9643c 100644
--- a/drivers/common/octeontx2/otx2_sec_idev.c
+++ b/drivers/common/octeontx2/otx2_sec_idev.c
@@ -55,7 +55,7 @@ otx2_sec_idev_tx_cpt_qp_add(uint16_t port_id, struct otx2_cpt_qp *qp)
 	struct otx2_sec_idev_cfg *cfg;
 	int i, ret;
 
-	if (qp == NULL || port_id > OTX2_MAX_INLINE_PORTS)
+	if (qp == NULL || port_id >= OTX2_MAX_INLINE_PORTS)
 		return -EINVAL;
 
 	cfg = &sec_cfg[port_id];
@@ -126,7 +126,7 @@ otx2_sec_idev_tx_cpt_qp_get(uint16_t port_id, struct otx2_cpt_qp **qp)
 	uint16_t index;
 	int i, ret;
 
-	if (port_id > OTX2_MAX_INLINE_PORTS || qp == NULL)
+	if (port_id >= OTX2_MAX_INLINE_PORTS || qp == NULL)
 		return -EINVAL;
 
 	cfg = &sec_cfg[port_id];
-- 
2.7.4


  reply	other threads:[~2020-05-16  9:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-16  9:26 [dpdk-dev] [PATCH 0/6] improvements to OCTEON TX crypto PMDs Anoob Joseph
2020-05-16  9:26 ` Anoob Joseph [this message]
2020-05-16  9:26 ` [dpdk-dev] [PATCH 2/6] net/octeontx2: increase max packet length for Inline IPsec Rx Anoob Joseph
2020-05-16  9:26 ` [dpdk-dev] [PATCH 3/6] crypto/octeontx2: enable non-byte aligned data feature Anoob Joseph
2020-05-16  9:26 ` [dpdk-dev] [PATCH 4/6] crypto/octeontx2: improve error handling in session configure Anoob Joseph
2020-05-16  9:26 ` [dpdk-dev] [PATCH 5/6] crypto/octeontx: enable non-byte aligned data feature Anoob Joseph
2020-05-16  9:26 ` [dpdk-dev] [PATCH 6/6] crypto/octeontx: redesign sym sessionless code path Anoob Joseph
2020-05-17 14:16 ` [dpdk-dev] [PATCH 0/6] improvements to OCTEON TX crypto PMDs Akhil Goyal
2020-05-18  4:26   ` Anoob Joseph
  -- strict thread matches above, loose matches on Subject: below --
2020-05-16  9:20 Anoob Joseph
2020-05-16  9:20 ` [dpdk-dev] [PATCH 1/6] common/octeontx2: fix out of bounds access Anoob Joseph

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1589621218-25339-2-git-send-email-anoobj@marvell.com \
    --to=anoobj@marvell.com \
    --cc=adwivedi@marvell.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=ktejasree@marvell.com \
    --cc=pathreya@marvell.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).