patch 'net/bnxt: check RSS queues and context init offset' has been queued to stable release 25.11.5

Kishore Padmanabha kishore.padmanabha at broadcom.com
Thu Dec 3 15:52:01 CET 2026


Please go ahead with the merge.

Thanks,
Kishore

On Thu, Dec 3, 2026 at 8:12 AM Kevin Traynor <ktraynor at redhat.com> wrote:

> Hi,
>
> FYI, your patch has been queued to stable release 25.11.5
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 12/08/26. So please
> shout if anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Queued patches are on a temporary branch at:
> https://github.com/kevintraynor/dpdk-stable
>
> This queued commit can be viewed at:
>
> https://github.com/kevintraynor/dpdk-stable/commit/2f1452012ff47c9340628e69cd4fac21891324e8
>
> Thanks.
>
> Kevin
>
> ---
> From 2f1452012ff47c9340628e69cd4fac21891324e8 Mon Sep 17 00:00:00 2001
> From: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
> Date: Wed, 9 Sep 2026 10:45:37 -0600
> Subject: [PATCH] net/bnxt: check RSS queues and context init offset
>
> [ upstream commit bab951eb89d4657710ba022b41b1f699fc9de282 ]
>
> Two independent out-of-bounds issues:
>
> - match_vnic_rss_cfg() indexed bp->rx_queues[] with firmware/
>   application-supplied RSS queue IDs without validating them against
>   bp->rx_nr_rings first, and dereferenced the resulting (possibly
>   NULL) queue pointer unconditionally.
>
> - bnxt_init_ctx_initializer() computed ctxm->init_offset from a
>   firmware-supplied byte offset without checking it against the
>   context entry's own size, allowing an out-of-range init offset to
>   be used later when initializing backing-store entries.
>
> Fixes: adc0f81c6552 ("net/bnxt: support RSS action")
> Fixes: fe2f715ca580 ("net/bnxt: support backing store v2")
>
> Signed-off-by: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
> Signed-off-by: Mohammad Shuab Siddique <
> mohammad-shuab.siddique at broadcom.com>
> ---
>  drivers/net/bnxt/bnxt_flow.c | 13 +++++++++++++
>  drivers/net/bnxt/bnxt_hwrm.c | 14 +++++++++++---
>  2 files changed, 24 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
> index bffa8efc01..34a3a1875b 100644
> --- a/drivers/net/bnxt/bnxt_flow.c
> +++ b/drivers/net/bnxt/bnxt_flow.c
> @@ -969,8 +969,21 @@ static int match_vnic_rss_cfg(struct bnxt *bp,
>         unsigned int match = 0, i;
>
> +       if (rss->queue_num > bp->rx_nr_rings)
> +               return -EINVAL;
> +
>         if (vnic->rx_queue_cnt != rss->queue_num)
>                 return -EINVAL;
>
>         for (i = 0; i < rss->queue_num; i++) {
> +               if (rss->queue[i] >= bp->rx_nr_rings) {
> +                       PMD_DRV_LOG_LINE(ERR, "Queue ID %u for RSS exceeds
> ring count %u",
> +                                        rss->queue[i], bp->rx_nr_rings);
> +                       return -EINVAL;
> +               }
> +               if (!bp->rx_queues[rss->queue[i]]) {
> +                       PMD_DRV_LOG_LINE(ERR, "Queue ID %u for RSS is not
> configured",
> +                                        rss->queue[i]);
> +                       return -EINVAL;
> +               }
>                 if (!bp->rx_queues[rss->queue[i]]->vnic->rx_queue_cnt &&
>                     !bp->rx_queues[rss->queue[i]]->rx_started)
> diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
> index 8160e266b5..f9f0575f8b 100644
> --- a/drivers/net/bnxt/bnxt_hwrm.c
> +++ b/drivers/net/bnxt/bnxt_hwrm.c
> @@ -6730,8 +6730,16 @@ static void bnxt_init_ctx_initializer(struct
> bnxt_ctx_mem *ctxm,
>         ctxm->init_value = init_val;
>         ctxm->init_offset = BNXT_CTX_INIT_INVALID_OFFSET;
> -       if (init_mask_set)
> -               ctxm->init_offset = init_offset * 4;
> -       else
> +       if (init_mask_set) {
> +               ctxm->init_offset = (uint16_t)(init_offset * 4);
> +               if (ctxm->init_offset >= ctxm->entry_size) {
> +                       PMD_DRV_LOG_LINE(WARNING,
> +                                        "ctx type 0x%x: init_offset %u >=
> entry_size %u, disabling init",
> +                                        ctxm->type, ctxm->init_offset,
> ctxm->entry_size);
> +                       ctxm->init_value = 0;
> +                       ctxm->init_offset = BNXT_CTX_INIT_INVALID_OFFSET;
> +               }
> +       } else {
>                 ctxm->init_value = 0;
> +       }
>  }
>
> --
> 2.56.1
>
> ---
>   Diff of the applied patch vs upstream commit (please double-check if
> non-empty:
> ---
> --- -   2026-12-03 12:52:45.014789980 +0000
> +++ 0202-net-bnxt-check-RSS-queues-and-context-init-offset.patch
> 2026-12-03 12:52:39.180938694 +0000
> @@ -1 +1 @@
> -From bab951eb89d4657710ba022b41b1f699fc9de282 Mon Sep 17 00:00:00 2001
> +From 2f1452012ff47c9340628e69cd4fac21891324e8 Mon Sep 17 00:00:00 2001
> @@ -5,0 +6,2 @@
> +[ upstream commit bab951eb89d4657710ba022b41b1f699fc9de282 ]
> +
> @@ -20 +21,0 @@
> -Cc: stable at dpdk.org
> @@ -30 +31 @@
> -index c500890ce7..66c2a9bbc1 100644
> +index bffa8efc01..34a3a1875b 100644
> @@ -33 +34 @@
> -@@ -963,8 +963,21 @@ static int match_vnic_rss_cfg(struct bnxt *bp,
> +@@ -969,8 +969,21 @@ static int match_vnic_rss_cfg(struct bnxt *bp,
> @@ -56 +57 @@
> -index df8cd14efb..ab1521953a 100644
> +index 8160e266b5..f9f0575f8b 100644
> @@ -59 +60 @@
> -@@ -6754,8 +6754,16 @@ static void bnxt_init_ctx_initializer(struct
> bnxt_ctx_mem *ctxm,
> +@@ -6730,8 +6730,16 @@ static void bnxt_init_ctx_initializer(struct
> bnxt_ctx_mem *ctxm,
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/stable/attachments/20261203/08f7e456/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5493 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mails.dpdk.org/archives/stable/attachments/20261203/08f7e456/attachment.bin>


More information about the stable mailing list