Skip to content

Commit 367e1e3

Browse files
anguy11gregkh
authored andcommitted
igb: Initialize mailbox message for VF reset
commit de5dc44 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: 6ddbc4c ("igb: Indicate failure on vf reset for empty mac address") Reported-by: Akihiko Odaki <[email protected]> Signed-off-by: Tony Nguyen <[email protected]> Reviewed-by: Akihiko Odaki <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a301742 commit 367e1e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7410,7 +7410,7 @@ static void igb_vf_reset_msg(struct igb_adapter *adapter, u32 vf)
74107410
{
74117411
struct e1000_hw *hw = &adapter->hw;
74127412
unsigned char *vf_mac = adapter->vf_data[vf].vf_mac_addresses;
7413-
u32 reg, msgbuf[3];
7413+
u32 reg, msgbuf[3] = {};
74147414
u8 *addr = (u8 *)(&msgbuf[1]);
74157415

74167416
/* process all the same items cleared in a function level reset */

0 commit comments

Comments
 (0)