<div dir="ltr"><div>Please go ahead with the merge.</div><div><br></div><div>Thanks,</div><div>Kishore</div><div></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Dec 3, 2026 at 8:13 AM Kevin Traynor <<a href="mailto:ktraynor@redhat.com">ktraynor@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
FYI, your patch has been queued to stable release 25.11.5<br>
<br>
Note it hasn't been pushed to <a href="http://dpdk.org/browse/dpdk-stable" rel="noreferrer" target="_blank">http://dpdk.org/browse/dpdk-stable</a> yet.<br>
It will be pushed if I get no objections before 12/08/26. So please<br>
shout if anyone has objections.<br>
<br>
Also note that after the patch there's a diff of the upstream commit vs the<br>
patch applied to the branch. This will indicate if there was any rebasing<br>
needed to apply to the stable branch. If there were code changes for rebasing<br>
(ie: not only metadata diffs), please double check that the rebase was<br>
correctly done.<br>
<br>
Queued patches are on a temporary branch at:<br>
<a href="https://github.com/kevintraynor/dpdk-stable" rel="noreferrer" target="_blank">https://github.com/kevintraynor/dpdk-stable</a><br>
<br>
This queued commit can be viewed at:<br>
<a href="https://github.com/kevintraynor/dpdk-stable/commit/a359fca4a372b76963a58977dd8cc2dd39ca8d6a" rel="noreferrer" target="_blank">https://github.com/kevintraynor/dpdk-stable/commit/a359fca4a372b76963a58977dd8cc2dd39ca8d6a</a><br>
<br>
Thanks.<br>
<br>
Kevin<br>
<br>
---<br>
>From a359fca4a372b76963a58977dd8cc2dd39ca8d6a Mon Sep 17 00:00:00 2001<br>
From: Stephen Hemminger <<a href="mailto:stephen@networkplumber.org" target="_blank">stephen@networkplumber.org</a>><br>
Date: Tue, 27 Oct 2026 20:53:53 -0700<br>
Subject: [PATCH] net/bnxt/tf_core: prevent buffer overflow in messages<br>
<br>
[ upstream commit 8be41609183e6da0ca2bc02b29fe442926232bf0 ]<br>
<br>
LTO build with -Werror reports stack overflows in tf_msg.c:<br>
<br>
In function 'tf_global_cfg_set':<br>
rte_memcpy.h:91:9: error: writing 16 bytes into a region of size 8<br>
tf_msg.c:1574:45: note: at offset 48 into destination object 'req'<br>
of size 56<br>
<br>
In function 'tf_msg_set_if_tbl_entry':<br>
rte_memcpy.h:105:9: error: writing 32 bytes into a region of size 0<br>
tf_msg.c:1813:41: note: at offset 136 into destination object 'req'<br>
of size 128<br>
<br>
tf_msg_set_global_cfg() limits config_sz_in_bytes to 16, but<br>
req.data and req.mask are each 8 bytes. A config larger than 8 bytes<br>
overruns data into mask, and the mask copy runs off the end of req.<br>
<br>
tf_msg_set_if_tbl_entry() has no check at all. data_sz_in_bytes is a<br>
uint16_t copied into the 88 byte req.data. The ULP mapper fills it<br>
from a blob of up to 128 bytes.<br>
<br>
Check both against sizeof() of the destination, as the matching get<br>
functions already do.<br>
<br>
Fixes: 98487d729b4a ("net/bnxt: cleanup and refactor session management")<br>
<br>
Signed-off-by: Stephen Hemminger <<a href="mailto:stephen@networkplumber.org" target="_blank">stephen@networkplumber.org</a>><br>
Acked-by: Kishore Padmanabha <<a href="mailto:kishore.padmanabha@broadcom.com" target="_blank">kishore.padmanabha@broadcom.com</a>><br>
---<br>
drivers/net/bnxt/tf_core/tf_msg.c | 6 ++++--<br>
1 file changed, 4 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/net/bnxt/tf_core/tf_msg.c b/drivers/net/bnxt/tf_core/tf_msg.c<br>
index c345d0a7ce..29a64deaf4 100644<br>
--- a/drivers/net/bnxt/tf_core/tf_msg.c<br>
+++ b/drivers/net/bnxt/tf_core/tf_msg.c<br>
@@ -24,5 +24,4 @@<br>
* tf.yaml changes.<br>
*/<br>
-#define TF_MSG_SET_GLOBAL_CFG_DATA_SIZE 16<br>
#define TF_MSG_EM_INSERT_KEY_SIZE 64<br>
#define TF_MSG_EM_INSERT_RECORD_SIZE 96<br>
@@ -1629,5 +1628,5 @@ tf_msg_set_global_cfg(struct tf *tfp,<br>
<br>
/* Check for data size conformity */<br>
- if (params->config_sz_in_bytes > TF_MSG_SET_GLOBAL_CFG_DATA_SIZE) {<br>
+ if (params->config_sz_in_bytes > sizeof(req.data)) {<br>
rc = -EINVAL;<br>
TFP_DRV_LOG(ERR,<br>
@@ -1827,4 +1826,7 @@ tf_msg_set_if_tbl_entry(struct tf *tfp,<br>
struct tf_session *tfs;<br>
<br>
+ if (params->data_sz_in_bytes > sizeof(req.data))<br>
+ return -EINVAL;<br>
+<br>
/* Retrieve the session information */<br>
rc = tf_session_get_session(tfp, &tfs);<br>
-- <br>
2.56.1<br>
<br>
---<br>
Diff of the applied patch vs upstream commit (please double-check if non-empty:<br>
---<br>
--- - 2026-12-03 12:52:46.850699523 +0000<br>
+++ 0269-net-bnxt-tf_core-prevent-buffer-overflow-in-messages.patch 2026-12-03 12:52:39.216199429 +0000<br>
@@ -1 +1 @@<br>
-From 8be41609183e6da0ca2bc02b29fe442926232bf0 Mon Sep 17 00:00:00 2001<br>
+From a359fca4a372b76963a58977dd8cc2dd39ca8d6a Mon Sep 17 00:00:00 2001<br>
@@ -5,0 +6,2 @@<br>
+[ upstream commit 8be41609183e6da0ca2bc02b29fe442926232bf0 ]<br>
+<br>
@@ -30 +31,0 @@<br>
-Cc: <a href="mailto:stable@dpdk.org" target="_blank">stable@dpdk.org</a><br>
<br>
</blockquote></div>