]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: L2CAP: Fix not checking for maximum number of DCID
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 15 Mar 2021 20:04:37 +0000 (13:04 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 15 Mar 2021 20:08:33 +0000 (21:08 +0100)
commit7cf1480edd2ef18aeaa071e8a53609e7cfba7b46
tree60a5f92041a556ec2233ec153f4c69b18b83306b
parente814cd80e3cdf4ef6177dfeb35a52bfbf6b3efa7
Bluetooth: L2CAP: Fix not checking for maximum number of DCID

When receiving L2CAP_CREDIT_BASED_CONNECTION_REQ the remote may request
more channels than allowed by the spec (10 octecs = 5 CIDs) so this
checks if the number of channels is bigger than the maximum allowed and
respond with an error.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/l2cap.h
net/bluetooth/l2cap_core.c