Skip to content

Commit ef1d739

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 c3a74b5 commit ef1d739

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
@@ -7165,7 +7165,7 @@ static void igb_vf_reset_msg(struct igb_adapter *adapter, u32 vf)
71657165
{
71667166
struct e1000_hw *hw = &adapter->hw;
71677167
unsigned char *vf_mac = adapter->vf_data[vf].vf_mac_addresses;
7168-
u32 reg, msgbuf[3];
7168+
u32 reg, msgbuf[3] = {};
71697169
u8 *addr = (u8 *)(&msgbuf[1]);
71707170

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

0 commit comments

Comments
 (0)