Skip to content

Commit a662965

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 ea73dae commit a662965

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
@@ -6422,7 +6422,7 @@ static void igb_vf_reset_msg(struct igb_adapter *adapter, u32 vf)
64226422
{
64236423
struct e1000_hw *hw = &adapter->hw;
64246424
unsigned char *vf_mac = adapter->vf_data[vf].vf_mac_addresses;
6425-
u32 reg, msgbuf[3];
6425+
u32 reg, msgbuf[3] = {};
64266426
u8 *addr = (u8 *)(&msgbuf[1]);
64276427

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

0 commit comments

Comments
 (0)