public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: nil Yi <teroincn@gmail.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [BUG] drivers: media: rc: imon.c: dangling pointer in function imon_init_intf1
Date: Sun, 1 Aug 2021 10:12:20 +0100	[thread overview]
Message-ID: <20210801091220.GA14445@gofer.mess.org> (raw)
In-Reply-To: <CANTwqXD8rc9gySvXuCofOJnJZrZQqOiHw_aYPrPZ==3A+by2gg@mail.gmail.com>

On Sun, Aug 01, 2021 at 04:32:15PM +0800, nil Yi wrote:
> Hi, there is a dangling pointer in ictx->rx_urb_intf1  in function
> imon_init_intf1 in v5.14-rc3
> in function imon_init_intf1:
> 2322: ictx->rx_urb_intf1 = rx_urb;
> ...
> 2362:  usb_free_urb(rx_urb);
> leave a dangling pointer here,  I'm not sure whether it  can be
> triggered somewhere.

I think this error path would lead to a double free. So you have an imon
device with two interfaces, and the probe on the second interface fails.

Now when the driver is removed from the first interface, we get a double
free. I think.


Sean

      reply	other threads:[~2021-08-01  9:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-01  8:32 [BUG] drivers: media: rc: imon.c: dangling pointer in function imon_init_intf1 nil Yi
2021-08-01  9:12 ` Sean Young [this message]

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=20210801091220.GA14445@gofer.mess.org \
    --to=sean@mess.org \
    --cc=linux-media@vger.kernel.org \
    --cc=teroincn@gmail.com \
    /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