Skip to content

Commit 617cc64

Browse files
Dan CarpenterJeff Kirsher
authored andcommitted
ixgbevf: off by one in ixgbevf_ipsec_tx()
The ipsec->tx_tbl[] array has IXGBE_IPSEC_MAX_SA_COUNT elements so the > should be a >=. Fixes: 0062e7c ("ixgbevf: add VF IPsec offload code") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Shannon Nelson <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 6b27f3d commit 617cc64

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/intel/ixgbevf

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/ixgbevf/ipsec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ int ixgbevf_ipsec_tx(struct ixgbevf_ring *tx_ring,
467467
}
468468

469469
sa_idx = xs->xso.offload_handle - IXGBE_IPSEC_BASE_TX_INDEX;
470-
if (unlikely(sa_idx > IXGBE_IPSEC_MAX_SA_COUNT)) {
470+
if (unlikely(sa_idx >= IXGBE_IPSEC_MAX_SA_COUNT)) {
471471
netdev_err(tx_ring->netdev, "%s: bad sa_idx=%d handle=%lu\n",
472472
__func__, sa_idx, xs->xso.offload_handle);
473473
return 0;

0 commit comments

Comments
 (0)