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]
Date:   Mon, 28 Oct 2019 09:50:54 +0000
From:   Sean Young <sean@...s.org>
To:     Navid Emamdoost <navid.emamdoost@...il.com>
Cc:     emamd001@....edu, kjlu@....edu, smccaman@....edu,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Allison Randal <allison@...utok.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        Richard Fontana <rfontana@...hat.com>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: dvb: Fix memory leak in af9005_identify_state

On Sun, Oct 27, 2019 at 05:24:35PM -0500, Navid Emamdoost wrote:
> In the implementation of af9005_identify_state() there is a memory leak
> when checking the reply of af9005_boot_packet(). Go to error path to
> release buf.
> 
> Fixes: af4e067e1dcf ("V4L/DVB (5625): Add support for the AF9005 demodulator from Afatech")
> Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>

Thank you for the patch.

Unfortunately a similar patch is already merged:

https://git.linuxtv.org/media_tree.git/commit/?id=2289adbfa559050d2a38bcd9caac1c18b800e928

Sean

> ---
>  drivers/media/usb/dvb-usb/af9005.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/usb/dvb-usb/af9005.c b/drivers/media/usb/dvb-usb/af9005.c
> index 02697d86e8c1..cfaf630be4d8 100644
> --- a/drivers/media/usb/dvb-usb/af9005.c
> +++ b/drivers/media/usb/dvb-usb/af9005.c
> @@ -975,8 +975,10 @@ static int af9005_identify_state(struct usb_device *udev,
>  		*cold = 1;
>  	else if (reply == 0x02)
>  		*cold = 0;
> -	else
> -		return -EIO;
> +	else {
> +		ret = -EIO;
> +		goto err;
> +	}
>  	deb_info("Identify state cold = %d\n", *cold);
>  
>  err:
> -- 
> 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ