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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1526319669.9159.20.camel@codethink.co.uk>
Date:   Mon, 14 May 2018 18:41:09 +0100
From:   Ben Hutchings <ben.hutchings@...ethink.co.uk>
To:     Oliver Neukum <oneukum@...e.com>,
        Hans Verkuil <hans.verkuil@...co.com>,
        Mauro Carvalho Chehab <mchehab@...pensource.com>
Cc:     stable@...r.kernel.org, "Yavuz, Tuba" <tuba@....ufl.edu>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4.4 49/72] media: usbtv: prevent double free in error
 case

On Fri, 2018-04-06 at 15:23 +0200, Greg Kroah-Hartman wrote:
> 4.4-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Oliver Neukum <oneukum@...e.com>
> 
> commit 50e7044535537b2a54c7ab798cd34c7f6d900bd2 upstream.
[...]
> --- a/drivers/media/usb/usbtv/usbtv-core.c
> +++ b/drivers/media/usb/usbtv/usbtv-core.c
> @@ -95,6 +95,8 @@ static int usbtv_probe(struct usb_interf
> >  	return 0;
>  
>  usbtv_audio_fail:
> +	/* we must not free at this point */
> +	usb_get_dev(usbtv->udev);

Shouldn't this bump the V4L2 device's reference count, i.e.:

	v4l2_device_get(&usbtv->v4l2_dev);

?

Ben.

>  	usbtv_video_free(usbtv);
>  
>  usbtv_video_fail:
> 
> 
> 
-- 
Ben Hutchings
Software Developer, Codethink Ltd.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ