[Intel-wired-lan] [next PATCH S80-V3 09/11] i40e: add check for return from find_first_bit call

Bowers, AndrewX andrewx.bowers at intel.com
Tue Sep 12 21:48:26 UTC 2017


> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Thursday, September 7, 2017 5:06 AM
> To: Michael, Alice <alice.michael at intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S80-V3 09/11] i40e: add check for
> return from find_first_bit call
> 
> From: Lihong Yang <lihong.yang at intel.com>
> 
> The find_first_bit function will return the size passed to search if the first set
> bit is not found. This patch adds the check in case that happens as the return
> value would be used as the index in an array and that would have caused the
> out-of-bounds access.
> 
> Detected by CoverityScan, CID 1295969 Out-of-bounds access
> 
> Signed-off-by: Lihong Yang <lihong.yang at intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 ++++
>  1 file changed, 4 insertions(+)

Tested-by: Andrew Bowers <andrewx.bowers at intel.com>




More information about the Intel-wired-lan mailing list