All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Ville Tervo <ville.tervo@nokia.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	maxk@qualcomm.com
Cc: bluez-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: net/bluetooth/rfcomm/tty.c: use-after-free
Date: Mon, 23 Jul 2007 03:25:43 +0200	[thread overview]
Message-ID: <20070723012543.GW26212@stusta.de> (raw)

Commit 8de0a15483b357d0f0b821330ec84d1660cadc4e added the following 
use-after-free in net/bluetooth/rfcomm/tty.c:

<--  snip  -->

...
static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
{
...
        if (IS_ERR(dev->tty_dev)) {
                list_del(&dev->list);
                kfree(dev);
                return PTR_ERR(dev->tty_dev);
        }
...

<--  snip  -->

Spotted by the Coverity checker.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


WARNING: multiple messages have this Message-ID (diff)
From: Adrian Bunk <bunk@stusta.de>
To: Ville Tervo <ville.tervo@nokia.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	maxk@qualcomm.com
Cc: bluez-devel@lists.sf.net, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: net/bluetooth/rfcomm/tty.c: use-after-free
Date: Mon, 23 Jul 2007 03:25:43 +0200	[thread overview]
Message-ID: <20070723012543.GW26212@stusta.de> (raw)

Commit 8de0a15483b357d0f0b821330ec84d1660cadc4e added the following 
use-after-free in net/bluetooth/rfcomm/tty.c:

<--  snip  -->

...
static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
{
...
        if (IS_ERR(dev->tty_dev)) {
                list_del(&dev->list);
                kfree(dev);
                return PTR_ERR(dev->tty_dev);
        }
...

<--  snip  -->

Spotted by the Coverity checker.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


             reply	other threads:[~2007-07-23  1:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23  1:25 Adrian Bunk [this message]
2007-07-23  1:25 ` net/bluetooth/rfcomm/tty.c: use-after-free Adrian Bunk
2007-07-23  7:47 ` [Bluez-devel] " Marcel Holtmann
2007-07-23  7:47   ` Marcel Holtmann
2007-07-23  7:47   ` Marcel Holtmann
2007-07-26  7:12   ` David Miller
2007-07-26  7:12     ` David Miller

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=20070723012543.GW26212@stusta.de \
    --to=bunk@stusta.de \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=maxk@qualcomm.com \
    --cc=netdev@vger.kernel.org \
    --cc=ville.tervo@nokia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.