]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ice: fix stack leakage
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Fri, 8 Nov 2019 14:23:21 +0000 (06:23 -0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 30 Jan 2020 15:27:18 +0000 (16:27 +0100)
commit03013f29da041930cebfb40d0ff0d285927694fd
tree1c1bbb02d12503b801fc3c8d7779d4e00cb4e4b5
parent1159e961ac6f328e68c7f933c5d503447e0d5f32
ice: fix stack leakage

BugLink: https://bugs.launchpad.net/bugs/1861091
commit 949375de945f7042df2b6488228a1a2b36e69f35 upstream.

In the case of an invalid virtchannel request the driver
would return uninitialized data to the VF from the PF stack
which is a bug.  Fix by initializing the stack variable
earlier in the function before any return paths can be taken.

Fixes: 1071a8358a28 ("ice: Implement virtchnl commands for AVF support")
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c