linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hyunwoo Kim <v4bel@theori.io>
To: mchehab@kernel.org
Cc: cai.huoqing@linux.dev, kernel@tuxforce.de,
	linux-media@vger.kernel.org, linux-usb@vger.kernel.org,
	tiwai@suse.de, lee@kernel.org, imv4bel@gmail.com,
	v4bel@theori.io
Subject: Re: [PATCH v3 0/4] Fix multiple race condition vulnerabilities in dvb-core and device driver
Date: Wed, 8 Mar 2023 18:06:50 -0800	[thread overview]
Message-ID: <20230309020650.GA47209@ubuntu> (raw)
In-Reply-To: <CADUEyCz=xuYjNQohgOi86vm4P4YyfO86AbM0cWdFrs1Y_6276g@mail.gmail.com>

On Tue, Mar 07, 2023 at 09:57:13PM +0900, Hyunwoo Kim wrote:
> ttusb_dec is a comment for patch #4 in the series.
> And as102 is the #1 patch.
> 
> 
> Regards,
> Hyunwoo Kim

I was using the wrong email client and the mailing list didn't get sent, sorry.

Resend the mail for the mailing list.

> 
> 
> 2023년 3월 7일 (화) 오후 9:41, Mauro Carvalho Chehab <mchehab@kernel.org>님이 작성:
> 
> > Em Wed, 16 Nov 2022 20:59:21 -0800
> > Hyunwoo Kim <imv4bel@gmail.com> escreveu:
> >
> > > Dear,
> > >
> > > This patch set is a security patch for various race condition
> > vulnerabilities that occur
> > > in 'dvb-core' and 'ttusb_dec', a dvb-based device driver.
> > >
> > >
> > > # 1. media: dvb-core: Fix use-after-free due to race condition occurring
> > in dvb_frontend
> > > This is a security patch for a race condition that occurs in the
> > dvb_frontend system of dvb-core.
> > >
> > > The race condition that occurs here will occur with _any_ device driver
> > using dvb_frontend.
> > >
> > > The race conditions that occur in dvb_frontend are as follows
> > > (Description is based on drivers/media/usb/as102/as102_drv.c using
> > dvb_frontend):
> > > ```
> > >                 cpu0                                                cpu1
> > >        1. open()
> > >           dvb_frontend_open()
> > >           dvb_frontend_get()    // kref : 3
> > >
> > >
> > >                                                              2.
> > as102_usb_disconnect()
> > >
> >  as102_dvb_unregister()
> > >
> >  dvb_unregister_frontend()
> > >
> >  dvb_frontend_put()    // kref : 2
> > >
> >  dvb_frontend_detach()
> > >
> >  dvb_frontend_put()    // kref : 1
> > >        3. close()
> > >           __fput()
> > >           dvb_frontend_release()
> > >           dvb_frontend_put()    // kref : 0
> > >           dvb_frontend_free()
> > >           __dvb_frontend_free()
> > >           dvb_free_device()
> > >           kfree (dvbdev->fops);
> > >           ...
> > >           fops_put(file->f_op);    // UAF!!
> >
> > Hmm... you're mentioning ttusb_dec at the comment, but here you're showing
> > the race for as102, which is a different driver.
> >
> > I'm confused.
> >
> >
> > Thanks,
> > Mauro
> >

  parent reply	other threads:[~2023-03-09  2:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17  4:59 [PATCH v3 0/4] Fix multiple race condition vulnerabilities in dvb-core and device driver Hyunwoo Kim
2022-11-17  4:59 ` [PATCH v3 1/4] media: dvb-core: Fix use-after-free due to race condition occurring in dvb_frontend Hyunwoo Kim
2022-11-17  4:59 ` [PATCH v3 2/4] media: dvb-core: Fix use-after-free due to race condition occurring in dvb_net Hyunwoo Kim
2022-11-17  4:59 ` [PATCH v3 3/4] media: dvb-core: Fix use-after-free due to race condition occurring in dvb_register_device() Hyunwoo Kim
2022-11-17  4:59 ` [PATCH v3 4/4] media: ttusb-dec: Fix memory leak in ttusb_dec_exit_dvb() Hyunwoo Kim
2023-01-10 14:18 ` [PATCH v3 0/4] Fix multiple race condition vulnerabilities in dvb-core and device driver Takashi Iwai
2023-02-22 13:23   ` Lee Jones
2023-02-28 11:32     ` Lee Jones
2023-03-07 10:36       ` Lee Jones
2023-03-07 11:08         ` V4bel
2023-03-08 13:39           ` Lee Jones
2023-03-09  0:15         ` Mauro Carvalho Chehab
2023-03-09 17:17           ` Lee Jones
2023-05-13 18:09             ` Mauro Carvalho Chehab
2023-05-14 14:56               ` Mauro Carvalho Chehab
2023-03-07 12:41 ` Mauro Carvalho Chehab
     [not found]   ` <CADUEyCz=xuYjNQohgOi86vm4P4YyfO86AbM0cWdFrs1Y_6276g@mail.gmail.com>
2023-03-09  2:06     ` Hyunwoo Kim [this message]
2023-03-09 17:18       ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230309020650.GA47209@ubuntu \
    --to=v4bel@theori.io \
    --cc=cai.huoqing@linux.dev \
    --cc=imv4bel@gmail.com \
    --cc=kernel@tuxforce.de \
    --cc=lee@kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).