DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org, Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	Andrzej Wilczynski <andrzejx.wilczynski@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Subject: [PATCH v1 1/1] net/ixgbe: fix PF link state request mailbox size
Date: Mon, 10 Nov 2025 13:55:39 +0000	[thread overview]
Message-ID: <2ff7218cef6c77858929c2aad49bf33d925f1865.1762782930.git.anatoly.burakov@intel.com> (raw)

From: Andrzej Wilczynski <andrzejx.wilczynski@intel.com>

Currently, when requesting PF link state over VF mailbox, the buffer sized
3 dwords is allocated. However, the `ixgbevf_write_msg_read_ack` function
is actually called with buffer size of 6 dwords. This leaves an admittedly
remote possibility of buffer overrun. Fix by adjusting requested size to 3.

Fixes: adbd71030575 ("net/ixgbe/base: fix link status for E610")

Signed-off-by: Andrzej Wilczynski <andrzejx.wilczynski@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/net/intel/ixgbe/base/ixgbe_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/intel/ixgbe/base/ixgbe_vf.c b/drivers/net/intel/ixgbe/base/ixgbe_vf.c
index 46a62bb851..eb16fb1942 100644
--- a/drivers/net/intel/ixgbe/base/ixgbe_vf.c
+++ b/drivers/net/intel/ixgbe/base/ixgbe_vf.c
@@ -482,7 +482,7 @@ int ixgbevf_get_pf_link_state(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 
 	msgbuf[0] = IXGBE_VF_GET_PF_LINK_STATE;
 
-	err = ixgbevf_write_msg_read_ack(hw, msgbuf, msgbuf, 6);
+	err = ixgbevf_write_msg_read_ack(hw, msgbuf, msgbuf, 3);
 	if (err || (msgbuf[0] & IXGBE_VT_MSGTYPE_FAILURE)) {
 		err = IXGBE_ERR_MBX;
 		*speed = IXGBE_LINK_SPEED_UNKNOWN;
-- 
2.47.3


                 reply	other threads:[~2025-11-10 13:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=2ff7218cef6c77858929c2aad49bf33d925f1865.1762782930.git.anatoly.burakov@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=andrzejx.wilczynski@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jedrzej.jagielski@intel.com \
    --cc=vladimir.medvedkin@intel.com \
    /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).