lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4adefe2d-dcae-f310-18cd-5e3269b8b593@oracle.com>
Date:   Wed, 9 May 2018 09:22:10 -0700
From:   Shannon Nelson <shannon.nelson@...cle.com>
To:     Colin King <colin.king@...onical.com>,
        Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
        "David S . Miller" <davem@...emloft.net>,
        intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ixgbe: fix memory leak on ipsec allocation

On 5/9/2018 6:58 AM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> The error clean up path kfree's adapter->ipsec and should be
> instead kfree'ing ipsec. Fix this.  Also, the err1 error exit path
> does not need to kfree ipsec because this failure path was for
> the failed allocation of ipsec.
> 
> Detected by CoverityScan, CID#146424 ("Resource Leak")
> 
> Fixes: 63a67fe229ea ("ixgbe: add ipsec offload add and remove SA")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>

Yep, thanks, good catch.

Acked-by: Shannon Nelson <shannon.nelson@...cle.com>


> ---
>   drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> index 41af2b81e960..195c0b65eee2 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> @@ -919,8 +919,8 @@ void ixgbe_init_ipsec_offload(struct ixgbe_adapter *adapter)
>   	kfree(ipsec->ip_tbl);
>   	kfree(ipsec->rx_tbl);
>   	kfree(ipsec->tx_tbl);
> +	kfree(ipsec);
>   err1:
> -	kfree(adapter->ipsec);
>   	netdev_err(adapter->netdev, "Unable to allocate memory for SA tables");
>   }
>   
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ