DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1 1/1] net/ixgbe: fix PF link state request mailbox size
@ 2025-11-10 13:55 Anatoly Burakov
  2025-11-12 15:51 ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Anatoly Burakov @ 2025-11-10 13:55 UTC (permalink / raw)
  To: dev, Vladimir Medvedkin, Andrzej Wilczynski, Bruce Richardson,
	Jedrzej Jagielski

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-12 16:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-10 13:55 [PATCH v1 1/1] net/ixgbe: fix PF link state request mailbox size Anatoly Burakov
2025-11-12 15:51 ` Bruce Richardson
2025-11-12 16:20   ` Bruce Richardson

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).