]> git.itanic.dy.fi Git - linux-stable/commit
Bluetooth: L2CAP: Fix invalid access if ECRED Reconfigure fails
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 19 May 2021 20:41:50 +0000 (13:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jul 2021 08:04:45 +0000 (10:04 +0200)
commit840907eecac0e7b5def12130b99aeb0f800c29f6
treea997c9798deb5d900bae6c4cb77aa0f9be11b52d
parentefffb7884033b87b8c7ee1e11f7cd73e1c2ffce9
Bluetooth: L2CAP: Fix invalid access if ECRED Reconfigure fails

[ Upstream commit 1fa20d7d4aad02206e84b74915819fbe9f81dab3 ]

The use of l2cap_chan_del is not safe under a loop using
list_for_each_entry.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/l2cap_core.c