]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: L2CAP: Add missing checks for invalid DCID
authorSungwoo Kim <iam@sung-woo.kim>
Sat, 3 Jun 2023 12:28:09 +0000 (08:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2023 08:59:55 +0000 (10:59 +0200)
commitc2c6133eebaf3eb2e16147b856e5bc63f70b48eb
treef724e32d52819638ff84a205bb7d26faa6e4785e
parent0f841f80390d5ffb8a01071b1286213789da1c60
Bluetooth: L2CAP: Add missing checks for invalid DCID

[ Upstream commit 75767213f3d9b97f63694d02260b6a49a2271876 ]

When receiving a connect response we should make sure that the DCID is
within the valid range and that we don't already have another channel
allocated for the same DCID.
Missing checks may violate the specification (BLUETOOTH CORE SPECIFICATION
Version 5.4 | Vol 3, Part A, Page 1046).

Fixes: 40624183c202 ("Bluetooth: L2CAP: Add missing checks for invalid LE DCID")
Signed-off-by: Sungwoo Kim <iam@sung-woo.kim>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/l2cap_core.c