patch 'net/bnxt/tf_core: prevent buffer overflow in messages' has been queued to stable release 25.11.5

Kishore Padmanabha kishore.padmanabha at broadcom.com
Thu Dec 3 15:50:26 CET 2026


Please go ahead with the merge.

Thanks,
Kishore

On Thu, Dec 3, 2026 at 8:13 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/a359fca4a372b76963a58977dd8cc2dd39ca8d6a
>
> Thanks.
>
> Kevin
>
> ---
> From a359fca4a372b76963a58977dd8cc2dd39ca8d6a Mon Sep 17 00:00:00 2001
> From: Stephen Hemminger <stephen at networkplumber.org>
> Date: Tue, 27 Oct 2026 20:53:53 -0700
> Subject: [PATCH] net/bnxt/tf_core: prevent buffer overflow in messages
>
> [ upstream commit 8be41609183e6da0ca2bc02b29fe442926232bf0 ]
>
> LTO build with -Werror reports stack overflows in tf_msg.c:
>
>   In function 'tf_global_cfg_set':
>   rte_memcpy.h:91:9: error: writing 16 bytes into a region of size 8
>   tf_msg.c:1574:45: note: at offset 48 into destination object 'req'
>   of size 56
>
>   In function 'tf_msg_set_if_tbl_entry':
>   rte_memcpy.h:105:9: error: writing 32 bytes into a region of size 0
>   tf_msg.c:1813:41: note: at offset 136 into destination object 'req'
>   of size 128
>
> tf_msg_set_global_cfg() limits config_sz_in_bytes to 16, but
> req.data and req.mask are each 8 bytes. A config larger than 8 bytes
> overruns data into mask, and the mask copy runs off the end of req.
>
> tf_msg_set_if_tbl_entry() has no check at all. data_sz_in_bytes is a
> uint16_t copied into the 88 byte req.data. The ULP mapper fills it
> from a blob of up to 128 bytes.
>
> Check both against sizeof() of the destination, as the matching get
> functions already do.
>
> Fixes: 98487d729b4a ("net/bnxt: cleanup and refactor session management")
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> Acked-by: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
> ---
>  drivers/net/bnxt/tf_core/tf_msg.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/bnxt/tf_core/tf_msg.c
> b/drivers/net/bnxt/tf_core/tf_msg.c
> index c345d0a7ce..29a64deaf4 100644
> --- a/drivers/net/bnxt/tf_core/tf_msg.c
> +++ b/drivers/net/bnxt/tf_core/tf_msg.c
> @@ -24,5 +24,4 @@
>   * tf.yaml changes.
>   */
> -#define TF_MSG_SET_GLOBAL_CFG_DATA_SIZE  16
>  #define TF_MSG_EM_INSERT_KEY_SIZE        64
>  #define TF_MSG_EM_INSERT_RECORD_SIZE     96
> @@ -1629,5 +1628,5 @@ tf_msg_set_global_cfg(struct tf *tfp,
>
>         /* Check for data size conformity */
> -       if (params->config_sz_in_bytes > TF_MSG_SET_GLOBAL_CFG_DATA_SIZE) {
> +       if (params->config_sz_in_bytes > sizeof(req.data)) {
>                 rc = -EINVAL;
>                 TFP_DRV_LOG(ERR,
> @@ -1827,4 +1826,7 @@ tf_msg_set_if_tbl_entry(struct tf *tfp,
>         struct tf_session *tfs;
>
> +       if (params->data_sz_in_bytes > sizeof(req.data))
> +               return -EINVAL;
> +
>         /* Retrieve the session information */
>         rc = tf_session_get_session(tfp, &tfs);
> --
> 2.56.1
>
> ---
>   Diff of the applied patch vs upstream commit (please double-check if
> non-empty:
> ---
> --- -   2026-12-03 12:52:46.850699523 +0000
> +++ 0269-net-bnxt-tf_core-prevent-buffer-overflow-in-messages.patch
>  2026-12-03 12:52:39.216199429 +0000
> @@ -1 +1 @@
> -From 8be41609183e6da0ca2bc02b29fe442926232bf0 Mon Sep 17 00:00:00 2001
> +From a359fca4a372b76963a58977dd8cc2dd39ca8d6a Mon Sep 17 00:00:00 2001
> @@ -5,0 +6,2 @@
> +[ upstream commit 8be41609183e6da0ca2bc02b29fe442926232bf0 ]
> +
> @@ -30 +31,0 @@
> -Cc: stable at dpdk.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/stable/attachments/20261203/0cc22ee0/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/0cc22ee0/attachment.bin>


More information about the stable mailing list