From: Emil Tantilov Date: Thu, 16 Oct 2014 15:49:02 +0000 (+0000) Subject: ixgbe: check for vfs outside of sriov_num_vfs before dereference X-Git-Tag: fixes-against-v3.18-rc2~61^2~21^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=600a507ddcb99096731e1d96a3ebf43e20fc7f80;p=pandora-kernel.git ixgbe: check for vfs outside of sriov_num_vfs before dereference The check for vfinfo is not sufficient because it does not protect against specifying vf that is outside of sriov_num_vfs range. All of the ndo functions have a check for it except for ixgbevf_ndo_set_spoofcheck(). The following patch is all we need to protect against this panic: ip link set p96p1 vf 0 spoofchk off BUG: unable to handle kernel NULL pointer dereference at 0000000000000052 IP: [] ixgbe_ndo_set_vf_spoofchk+0x51/0x150 [ixgbe] Reported-by: Thierry Herbelot Signed-off-by: Emil Tantilov Acked-by: Thierry Herbelot Signed-off-by: Jeff Kirsher --- Reading git-diff-tree failed