ixgbevf: off by one in ixgbevf_ipsec_tx()
Subsystems (4)
PATCH 1/1 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 >=.
drivers/net/ethernet/intel/ixgbevf/ipsec.c +1 -1
@@ -470,7 +470,7 @@ int ixgbevf_ipsec_tx(struct ixgbevf_ring *tx_ring, } sa_idx = xs->xso.offload_handle -IXGBE_IPSEC_BASE_TX_INDEX ; -if (unlikely (sa_idx >IXGBE_IPSEC_MAX_SA_COUNT )) { +if (unlikely (sa_idx >=IXGBE_IPSEC_MAX_SA_COUNT )) {netdev_err (tx_ring->netdev,"%s: bad sa_idx=%d handle=%lu\n" , __func__, sa_idx, xs->xso.offload_handle);return 0 ;
Quoted 5 lines · Dan Carpenter
The ipsec->tx_tbl[] array has
IXGBE_IPSEC_MAX_SA_COUNTelements so the > should be a >=.Fixes 0062e7cc955e ("ixgbevf: add VF IPsec offload code")Signed-off-by Dan Carpenter <[email protected]>
Quoted 15 lines
drivers/net/ethernet/intel/ixgbevf/ipsec.c +1
-1@@ -470,7 +470,7 @@ int ixgbevf_ipsec_tx(struct ixgbevf_ring *tx_ring, } sa_idx = xs->xso.offload_handle -IXGBE_IPSEC_BASE_TX_INDEX ; -if (unlikely (sa_idx >IXGBE_IPSEC_MAX_SA_COUNT )) { +if (unlikely (sa_idx >=IXGBE_IPSEC_MAX_SA_COUNT )) {netdev_err (tx_ring->netdev,"%s: bad sa_idx=%d handle=%lu\n" , __func__, sa_idx, xs->xso.offload_handle);return 0 ;
Bowers
PATCH 1/1 ixgbevf: off by one in ixgbevf_ipsec_tx()
In reply to Dan CarpenterQuoted 10 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Dan Carpenter
Sent: Wednesday, September 19, 2018 3:35 AM
To: Kirsher, Jeffrey T <[email protected]>; Shannon Nelson <[email protected]>
Cc: netdev at vger.kernel.org; kernel-janitors at vger.kernel.org; intel-wired- lan at lists.osuosl.org; David S. Miller <[email protected]>
Subject: [Intel-wired-lan] [PATCH] ixgbevf: off by one inixgbevf_ipsec_tx()
Quoted 5 lines
The ipsec->tx_tbl[] array has
IXGBE_IPSEC_MAX_SA_COUNTelements so the > should be a >=.Fixes 0062e7cc955e ("ixgbevf: add VF IPsec offload code")Signed-off-by Dan Carpenter <[email protected]>