[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAeHK+yU10k0ESZj2axpOCzC-7P9tq4oF2Z5-_7NpRN47JOJVA@mail.gmail.com>
Date: Tue, 24 Oct 2017 13:42:45 +0200
From: Andrey Konovalov <andreyknvl@...gle.com>
To: Arvind Yadav <arvind.yadav.cs@...il.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Max Kellermann <max.kellermann@...il.com>,
Shuah Khan <shuah@...nel.org>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Colin Ian King <colin.king@...onical.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Kostya Serebryany <kcc@...gle.com>,
LKML <linux-kernel@...r.kernel.org>, linux-media@...r.kernel.org,
syzkaller <syzkaller@...glegroups.com>,
Matthias Schwarzott <zzam@...too.org>
Subject: Re: [RFT] media: dvb_frontend: Fix use-after-free in __dvb_frontend_free
On Tue, Oct 24, 2017 at 1:36 PM, Arvind Yadav <arvind.yadav.cs@...il.com> wrote:
> Here, dvb_free_device will free dvb_device. dvb_frontend_invoke_release
> is using dvb_device after free.
Hi Arvind,
Matthias already suggested a fix. Also it looks like your patch is
based on an outdated tree, which doesn't contain the commit that seems
to have caused the bug (ead666000a5fe34bdc82d61838e4df2d416ea15e).
Thanks!
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
> ---
> This bug report by Andrey Konovalov (usb/media/dtt200u: use-after-free
> in __dvb_frontend_free).
>
> drivers/media/dvb-core/dvb_frontend.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
> index 2fcba16..7f1ef12 100644
> --- a/drivers/media/dvb-core/dvb_frontend.c
> +++ b/drivers/media/dvb-core/dvb_frontend.c
> @@ -147,10 +147,10 @@ static void dvb_frontend_free(struct kref *ref)
> container_of(ref, struct dvb_frontend, refcount);
> struct dvb_frontend_private *fepriv = fe->frontend_priv;
>
> - dvb_free_device(fepriv->dvbdev);
> -
> dvb_frontend_invoke_release(fe, fe->ops.release);
>
> + dvb_free_device(fepriv->dvbdev);
> +
> kfree(fepriv);
> }
>
> --
> 1.9.1
>
Powered by blists - more mailing lists