Bluetooth: L2CAP: Fix not checking l2cap_chan security level
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 7 May 2025 19:00:30 +0000 (15:00 -0400)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 15 May 2025 17:09:46 +0000 (13:09 -0400)
commit7af8479d9eb4319b4ba7b47a8c4d2c55af1c31e1
tree5fe7fb25bcea2b7d34faa913c72e6b665b7bb031
parent0afc44d8cdf6029cce0a92873f0de5ac9416cec8
Bluetooth: L2CAP: Fix not checking l2cap_chan security level

l2cap_check_enc_key_size shall check the security level of the
l2cap_chan rather than the hci_conn since for incoming connection
request that may be different as hci_conn may already been
encrypted using a different security level.

Fixes: 522e9ed157e3 ("Bluetooth: l2cap: Check encryption key size on incoming connection")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/l2cap_core.c