[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <792c0d59-5d12-7962-90a6-b17881aaefd9@oracle.com>
Date: Mon, 9 Jul 2018 08:53:23 -0700
From: Shannon Nelson <shannon.nelson@...cle.com>
To: Dan Carpenter <dan.carpenter@...cle.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc: "David S. Miller" <davem@...emloft.net>,
intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net] ixgbe: Off by one in ixgbe_ipsec_tx()
On 7/4/2018 2:53 AM, Dan Carpenter wrote:
> The ipsec->tx_tbl[] has IXGBE_IPSEC_MAX_SA_COUNT elements so the > needs
> to be changed to >= so we don't read one element beyond the end of the
> array.
>
> Fixes: 592594704761 ("ixgbe: process the Tx ipsec offload")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Acked-by: Shannon Nelson <shannon.nelson@...cle.com>
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> index c116f459945d..da4322e4daed 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> @@ -839,7 +839,7 @@ int ixgbe_ipsec_tx(struct ixgbe_ring *tx_ring,
> }
>
> itd->sa_idx = xs->xso.offload_handle - IXGBE_IPSEC_BASE_TX_INDEX;
> - if (unlikely(itd->sa_idx > IXGBE_IPSEC_MAX_SA_COUNT)) {
> + if (unlikely(itd->sa_idx >= IXGBE_IPSEC_MAX_SA_COUNT)) {
> netdev_err(tx_ring->netdev, "%s: bad sa_idx=%d handle=%lu\n",
> __func__, itd->sa_idx, xs->xso.offload_handle);
> return 0;
>
Powered by blists - more mailing lists