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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200811124614.2myealhkhnla6v3a@duo.ucw.cz>
Date:   Tue, 11 Aug 2020 14:46:14 +0200
From:   Pavel Machek <pavel@...x.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Martyna Szapar <martyna.szapar@...el.com>,
        Andrew Bowers <andrewx.bowers@...el.com>,
        Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
        Jesse Brandeburg <jesse.brandeburg@...el.com>
Subject: Re: [PATCH 4.19 47/48] i40e: Memory leak in i40e_config_iwarp_qvlist

Hi!

> From: Martyna Szapar <martyna.szapar@...el.com>
> 
> [ Upstream commit 0b63644602cfcbac849f7ea49272a39e90fa95eb ]
> 
> Added freeing the old allocation of vf->qvlist_info in function
> i40e_config_iwarp_qvlist before overwriting it with
> the new allocation.

Ok, but this also other error paths:

> --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> @@ -449,16 +450,19 @@ static int i40e_config_iwarp_qvlist(stru
>  			 "Incorrect number of iwarp vectors %u. Maximum %u allowed.\n",
>  			 qvlist_info->num_vectors,
>  			 msix_vf);
> -		goto err;
> +		ret = -EINVAL;
> +		goto err_out;
>  	}

And it is no longer freeing data qvlist_info() in this path. Is that
correct? Should it goto err_free instead? 

> @@ -512,10 +518,11 @@ static int i40e_config_iwarp_qvlist(stru
>  	}
>  
>  	return 0;
> -err:
> +err_free:
>  	kfree(vf->qvlist_info);
>  	vf->qvlist_info = NULL;
> -	return -EINVAL;
> +err_out:
> +	return ret;
>  }

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ