patch 'net/bnxt: fix TPA agg Rx descriptor and VNIC query bounds' has been queued to stable release 25.11.5

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


Please go ahead with the merge.

Thanks,
Kishore

On Thu, Dec 3, 2026 at 8:11 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/ec1941ad652e81beaefc59beffc89f0cef517141
>
> Thanks.
>
> Kevin
>
> ---
> From ec1941ad652e81beaefc59beffc89f0cef517141 Mon Sep 17 00:00:00 2001
> From: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
> Date: Tue, 29 Sep 2026 12:04:08 -0600
> Subject: [PATCH] net/bnxt: fix TPA agg Rx descriptor and VNIC query bounds
>
> [ upstream commit cf4fc5219ac80d5762dfe599e3564b1addd6595f ]
>
> Three independent out-of-bounds issues:
>
> - bnxt_rx_pkt() incremented tpa_info->agg_count and indexed
>   tpa_info->agg_arr[] with only an RTE_ASSERT (compiled out in release
>   builds) guarding the array bound, allowing an out-of-bounds write if
>   firmware sent more aggregation segments than TPA_MAX_NUM_SEGS.
>
> - bnxt_rx_descriptor_status_op() used the firmware-supplied completion
>   opaque value directly as an rx_buf_ring[] index without masking it to
>   the ring size first.
>
> - bnxt_hwrm_func_vf_vnic_query() returned the firmware-reported
>   vnic_id_cnt unclamped; a value exceeding bp->pf->total_vnics would
>   cause the caller to iterate past the end of its VNIC ID buffer.
>
> Fixes: b150a7e7ee66 ("net/bnxt: support LRO on Thor adapters")
> Fixes: 0fe613bb87b2 ("net/bnxt: support Rx descriptor status")
> Fixes: cbcd375d37d2 ("net/bnxt: fix HWRM macros and locking")
>
> 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_ethdev.c |  3 ++-
>  drivers/net/bnxt/bnxt_hwrm.c   |  3 ++-
>  drivers/net/bnxt/bnxt_rxr.c    | 10 +++++++++-
>  3 files changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c
> b/drivers/net/bnxt/bnxt_ethdev.c
> index a0ca729969..66be5bd9e3 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -3589,5 +3589,6 @@ bnxt_rx_descriptor_status_op(void *rx_queue,
> uint16_t offset)
>                 case CMPL_BASE_TYPE_RX_L2_V2:
>                         if (desc == offset) {
> -                               cons = rxcmp->opaque;
> +                               cons = RING_IDX(rxr->rx_ring_struct,
> +                                                rxcmp->opaque);
>                                 if (rxr->rx_buf_ring[cons])
>                                         return RTE_ETH_RX_DESC_DONE;
> diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
> index 1dac15d02d..4fb184fb8e 100644
> --- a/drivers/net/bnxt/bnxt_hwrm.c
> +++ b/drivers/net/bnxt/bnxt_hwrm.c
> @@ -6194,5 +6194,6 @@ static int bnxt_hwrm_func_vf_vnic_query(struct bnxt
> *bp, uint16_t vf,
>         rc = bnxt_hwrm_send_message(bp, &req, sizeof(req),
> BNXT_USE_CHIMP_MB);
>         HWRM_CHECK_RESULT();
> -       rc = rte_le_to_cpu_32(resp->vnic_id_cnt);
> +       rc = RTE_MIN(rte_le_to_cpu_32(resp->vnic_id_cnt),
> +                    (uint32_t)bp->pf->total_vnics);
>
>         HWRM_UNLOCK();
> diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
> index d6c89c9e23..4c924a6b42 100644
> --- a/drivers/net/bnxt/bnxt_rxr.c
> +++ b/drivers/net/bnxt/bnxt_rxr.c
> @@ -1167,5 +1167,13 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
>
>                 tpa_info = &rxr->tpa_info[agg_id];
> -               RTE_ASSERT(tpa_info->agg_count < 16);
> +               if (unlikely(tpa_info->agg_count >= TPA_MAX_NUM_SEGS)) {
> +                       PMD_DRV_LOG_LINE(ERR,
> +                                        "TPA abuf: agg_count %u exceeds
> max %u",
> +                                        tpa_info->agg_count,
> TPA_MAX_NUM_SEGS);
> +                       tpa_info->agg_count = 0;
> +                       bnxt_sched_ring_reset(rxq);
> +                       rc = -EINVAL;
> +                       goto next_rx;
> +               }
>                 tpa_info->agg_arr[tpa_info->agg_count++] = *rx_agg;
>                 rc = -EINVAL; /* Continue w/o new mbuf */
> --
> 2.56.1
>
> ---
>   Diff of the applied patch vs upstream commit (please double-check if
> non-empty:
> ---
> --- -   2026-12-03 12:52:44.750989726 +0000
> +++ 0193-net-bnxt-fix-TPA-agg-Rx-descriptor-and-VNIC-query-bo.patch
>  2026-12-03 12:52:39.169938686 +0000
> @@ -1 +1 @@
> -From cf4fc5219ac80d5762dfe599e3564b1addd6595f Mon Sep 17 00:00:00 2001
> +From ec1941ad652e81beaefc59beffc89f0cef517141 Mon Sep 17 00:00:00 2001
> @@ -5,0 +6,2 @@
> +[ upstream commit cf4fc5219ac80d5762dfe599e3564b1addd6595f ]
> +
> @@ -24 +25,0 @@
> -Cc: stable at dpdk.org
> @@ -35 +36 @@
> -index 20084826d3..3a530c31aa 100644
> +index a0ca729969..66be5bd9e3 100644
> @@ -38 +39 @@
> -@@ -3625,5 +3625,6 @@ bnxt_rx_descriptor_status_op(void *rx_queue,
> uint16_t offset)
> +@@ -3589,5 +3589,6 @@ bnxt_rx_descriptor_status_op(void *rx_queue,
> uint16_t offset)
> @@ -47 +48 @@
> -index 361402b36f..42ed6e5ae1 100644
> +index 1dac15d02d..4fb184fb8e 100644
> @@ -50 +51 @@
> -@@ -6235,5 +6235,6 @@ static int bnxt_hwrm_func_vf_vnic_query(struct bnxt
> *bp, uint16_t vf,
> +@@ -6194,5 +6194,6 @@ static int bnxt_hwrm_func_vf_vnic_query(struct bnxt
> *bp, uint16_t vf,
> @@ -59 +60 @@
> -index 1790ce839f..fa10446c27 100644
> +index d6c89c9e23..4c924a6b42 100644
> @@ -62 +63 @@
> -@@ -1157,5 +1157,13 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
> +@@ -1167,5 +1167,13 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/stable/attachments/20261203/729f80ab/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/729f80ab/attachment.bin>


More information about the stable mailing list