public inbox for patches@lists.linux.dev
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, Akihiko Odaki <akihiko.odaki@daynix.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Leon Romanovsky <leonro@nvidia.com>,
	Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH 5.10 11/18] igb: Initialize mailbox message for VF reset
Date: Mon, 19 Dec 2022 20:25:04 +0100	[thread overview]
Message-ID: <20221219182941.041988624@linuxfoundation.org> (raw)
In-Reply-To: <20221219182940.701087296@linuxfoundation.org>

From: Tony Nguyen <anthony.l.nguyen@intel.com>

commit de5dc44370fbd6b46bd7f1a1e00369be54a041c8 upstream.

When a MAC address is not assigned to the VF, that portion of the message
sent to the VF is not set. The memory, however, is allocated from the
stack meaning that information may be leaked to the VM. Initialize the
message buffer to 0 so that no information is passed to the VM in this
case.

Fixes: 6ddbc4cf1f4d ("igb: Indicate failure on vf reset for empty mac address")
Reported-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/20221212190031.3983342-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/igb/igb_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -7416,7 +7416,7 @@ static void igb_vf_reset_msg(struct igb_
 {
 	struct e1000_hw *hw = &adapter->hw;
 	unsigned char *vf_mac = adapter->vf_data[vf].vf_mac_addresses;
-	u32 reg, msgbuf[3];
+	u32 reg, msgbuf[3] = {};
 	u8 *addr = (u8 *)(&msgbuf[1]);
 
 	/* process all the same items cleared in a function level reset */



  parent reply	other threads:[~2022-12-19 19:28 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19 19:24 [PATCH 5.10 00/18] 5.10.161-rc1 review Greg Kroah-Hartman
2022-12-19 19:24 ` [PATCH 5.10 01/18] udf: Discard preallocation before extending file with a hole Greg Kroah-Hartman
2022-12-19 19:24 ` [PATCH 5.10 02/18] udf: Fix preallocation discarding at indirect extent boundary Greg Kroah-Hartman
2022-12-19 19:24 ` [PATCH 5.10 03/18] udf: Do not bother looking for prealloc extents if i_lenExtents matches i_size Greg Kroah-Hartman
2022-12-19 19:24 ` [PATCH 5.10 04/18] udf: Fix extending file within last block Greg Kroah-Hartman
2022-12-19 19:24 ` [PATCH 5.10 05/18] usb: gadget: uvc: Prevent buffer overflow in setup handler Greg Kroah-Hartman
2022-12-19 19:24 ` [PATCH 5.10 06/18] USB: serial: option: add Quectel EM05-G modem Greg Kroah-Hartman
2022-12-19 19:25 ` [PATCH 5.10 07/18] USB: serial: cp210x: add Kamstrup RF sniffer PIDs Greg Kroah-Hartman
2022-12-19 19:25 ` [PATCH 5.10 08/18] USB: serial: f81232: fix division by zero on line-speed change Greg Kroah-Hartman
2022-12-19 19:25 ` [PATCH 5.10 09/18] USB: serial: f81534: " Greg Kroah-Hartman
2022-12-19 19:25 ` [PATCH 5.10 10/18] xhci: Apply XHCI_RESET_TO_DEFAULT quirk to ADL-N Greg Kroah-Hartman
2022-12-19 19:25 ` Greg Kroah-Hartman [this message]
2022-12-19 19:25 ` [PATCH 5.10 12/18] usb: ulpi: defer ulpi_register on ulpi_read_id timeout Greg Kroah-Hartman
2022-12-19 19:25 ` [PATCH 5.10 13/18] HID: ite: Add support for Acer S1002 keyboard-dock Greg Kroah-Hartman
2022-12-19 19:25 ` [PATCH 5.10 14/18] HID: ite: Enable QUIRK_TOUCHPAD_ON_OFF_REPORT on Acer Aspire Switch 10E Greg Kroah-Hartman
2022-12-19 19:25 ` [PATCH 5.10 15/18] HID: ite: Enable QUIRK_TOUCHPAD_ON_OFF_REPORT on Acer Aspire Switch V 10 Greg Kroah-Hartman
2022-12-19 19:25 ` [PATCH 5.10 16/18] HID: uclogic: Add HID_QUIRK_HIDINPUT_FORCE quirk Greg Kroah-Hartman
2022-12-19 19:25 ` [PATCH 5.10 17/18] Bluetooth: L2CAP: Fix u8 overflow Greg Kroah-Hartman
2022-12-19 19:25 ` [PATCH 5.10 18/18] net: loopback: use NET_NAME_PREDICTABLE for name_assign_type Greg Kroah-Hartman
2022-12-19 22:12 ` [PATCH 5.10 00/18] 5.10.161-rc1 review Pavel Machek
2022-12-19 22:36 ` Slade Watkins
2022-12-21  1:15   ` Slade Watkins
2022-12-19 23:21 ` Florian Fainelli
2022-12-20  0:22 ` Shuah Khan
2022-12-20  6:57 ` Naresh Kamboju
2022-12-20  9:18 ` Rudi Heitbaum
2022-12-20 11:18 ` Sudip Mukherjee (Codethink)
2022-12-20 14:48 ` Guenter Roeck
2022-12-20 15:33   ` Guenter Roeck
2022-12-20 17:50 ` Jon Hunter

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=20221219182941.041988624@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=akihiko.odaki@daynix.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=kuba@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /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