Skip to content

Commit

Permalink
Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm
Browse files Browse the repository at this point in the history
jira VULN-210
cve CVE-2022-42896
commit-author Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
commit f937b75

l2cap_global_chan_by_psm shall not return fixed channels as they are not
meant to be connected by (S)PSM.

	Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
	Reviewed-by: Tedd Ho-Jeong An <tedd.an@intel.com>
(cherry picked from commit f937b75)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
  • Loading branch information
pvts-mat committed Jan 21, 2025
1 parent 16555bf commit 173f938
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1984,7 +1984,7 @@ static struct l2cap_chan *l2cap_global_chan_by_psm(int state, __le16 psm,
if (link_type == LE_LINK && c->src_type == BDADDR_BREDR)
continue;

if (c->psm == psm) {
if (c->chan_type != L2CAP_CHAN_FIXED && c->psm == psm) {
int src_match, dst_match;
int src_any, dst_any;

Expand Down

0 comments on commit 173f938

Please sign in to comment.