[Intel-wired-lan] [PATCH] i40e: avoid potential null pointer dereference when assigning len
Bowers, AndrewX
andrewx.bowers at intel.com
Mon Aug 29 17:36:40 UTC 2016
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Colin King
> Sent: Sunday, August 28, 2016 10:41 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher at intel.com>; intel-wired-
> lan at lists.osuosl.org; netdev at vger.kernel.org
> Cc: linux-kernel at vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH] i40e: avoid potential null pointer
> dereference when assigning len
>
> From: Colin Ian King <colin.king at canonical.com>
>
> There is a sanitcy check for desc being null in the first line of function
> i40evf_debug_aq. However, before that, aq_desc is cast from desc, and
> aq_desc is being dereferenced on the assignment of len, so this could be a
> potential null pointer deference. Fix this by moving the initialization of len to
> the code block where len is being used and hence at this point we know it is
> OK to dereference aq_desc.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> drivers/net/ethernet/intel/i40evf/i40e_common.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Tested-by: Andrew Bowers <andrewx.bowers at intel.com>
More information about the Intel-wired-lan
mailing list