From: Jerin Jacob <jerinj@marvell.com>
To: Bruce Richardson <bruce.richardson@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
Naga Harish K S V <s.v.naga.harish.k@intel.com>,
Nikhil Rao <nikhil.rao@intel.com>
Subject: RE: [EXTERNAL] [PATCH] eventdev: fix possible array underflow/overflow
Date: Mon, 18 Nov 2024 10:01:27 +0000 [thread overview]
Message-ID: <BY3PR18MB4785229334423A89E1236889C8272@BY3PR18MB4785.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20241114115538.3736059-1-bruce.richardson@intel.com>
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Thursday, November 14, 2024 5:26 PM
> To: dev@dpdk.org
> Cc: Bruce Richardson <bruce.richardson@intel.com>; stable@dpdk.org; Naga
> Harish K S V <s.v.naga.harish.k@intel.com>; Jerin Jacob <jerinj@marvell.com>;
> Nikhil Rao <nikhil.rao@intel.com>
> Subject: [EXTERNAL] [PATCH] eventdev: fix possible array underflow/overflow
>
> If the number of interrupts is zero, then indexing an array by "nb_rx_intr - 1"
> will cause an out-of-bounds write Fix this by putting in a check that nb_rx_intr >
> 0 before doing the array write. Coverity issue: 448870 Fixes: 3810ae435783
>
> If the number of interrupts is zero, then indexing an array by "nb_rx_intr - 1"
> will cause an out-of-bounds write Fix this by putting in a check that nb_rx_intr
> > 0 before doing the array write.
>
> Coverity issue: 448870
> Fixes: 3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter")
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-eventdev/for-main. Thanks
> ---
> lib/eventdev/rte_event_eth_rx_adapter.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c
> b/lib/eventdev/rte_event_eth_rx_adapter.c
> index 3ee20d95f3..39674c4604 100644
> --- a/lib/eventdev/rte_event_eth_rx_adapter.c
> +++ b/lib/eventdev/rte_event_eth_rx_adapter.c
> @@ -2299,7 +2299,7 @@ rxa_sw_add(struct event_eth_rx_adapter
> *rx_adapter, uint16_t eth_dev_id,
> for (i = 0; i < dev_info->dev->data->nb_rx_queues; i++)
> dev_info->intr_queue[i] = i;
> } else {
> - if (!rxa_intr_queue(dev_info, rx_queue_id))
> + if (!rxa_intr_queue(dev_info, rx_queue_id) &&
> nb_rx_intr > 0)
> dev_info->intr_queue[nb_rx_intr - 1] =
> rx_queue_id;
> }
> --
> 2.43.0
prev parent reply other threads:[~2024-11-18 10:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 11:55 Bruce Richardson
2024-11-18 10:01 ` Jerin Jacob [this message]
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=BY3PR18MB4785229334423A89E1236889C8272@BY3PR18MB4785.namprd18.prod.outlook.com \
--to=jerinj@marvell.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=nikhil.rao@intel.com \
--cc=s.v.naga.harish.k@intel.com \
--cc=stable@dpdk.org \
/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).