[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1185176832.7111.32.camel@violet>
Date: Mon, 23 Jul 2007 09:47:12 +0200
From: Marcel Holtmann <marcel@...tmann.org>
To: Adrian Bunk <bunk@...sta.de>
Cc: Ville Tervo <ville.tervo@...ia.com>, maxk@...lcomm.com,
bluez-devel@...ts.sf.net, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: net/bluetooth/rfcomm/tty.c: use-after-free
Hi Adrian,
> 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.
really good catch. I fully overlooked that one. The attached patch
should fix it.
Signed-off-by: Marcel Holtmann <marcel@...tmann.org>
Regards
Marcel
View attachment "patch" of type "text/x-patch" (647 bytes)
Powered by blists - more mailing lists