Bluetooth: L2CAP: Fix not checking for maximum number of DCID
[ Upstream commit 7cf3b1dd6aa603fd80969e9e7160becf1455a0eb ] 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> Stable-dep-of: 9aa9d9473f15 ("Bluetooth: L2CAP: Fix responding with wrong PDU type") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
65ceb17074
commit
77a61df0a0
@@ -493,6 +493,7 @@ struct l2cap_le_credits {
|
||||
|
||||
#define L2CAP_ECRED_MIN_MTU 64
|
||||
#define L2CAP_ECRED_MIN_MPS 64
|
||||
#define L2CAP_ECRED_MAX_CID 5
|
||||
|
||||
struct l2cap_ecred_conn_req {
|
||||
__le16 psm;
|
||||
|
Reference in New Issue
Block a user