]> git.baikalelectronics.ru Git - kernel.git/commit
ice: fix stack leakage
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Fri, 8 Nov 2019 14:23:21 +0000 (06:23 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 22 Nov 2019 21:09:31 +0000 (13:09 -0800)
commit4f157a8f7794fc8d8252f3868ca40784a2d128d9
tree569bb9fa6b9490579064795caea77f9bb8ffa5ab
parent59b7af702e4147e5a01ebf55419ca383cdaa098f
ice: fix stack leakage

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: 62a23ebfa579 ("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>
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c