diff options
| author | Siwei Zhang <oss@fourdim.xyz> | 2026-10-13 11:36:37 -0400 |
|---|---|---|
| committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2026-10-14 14:38:28 -0400 |
| commit | a518b9a9ef6ee3b18ecdf6ba5360c608aaf969e9 (patch) | |
| tree | cfb6de1edeca9167bb545721e2d99f3796cbb7a3 /scripts/basic | |
| parent | 226fa3b676cbf2236f803bccd347462433ffc2c8 (diff) | |
Bluetooth: L2CAP: Only accept connection responses to outstanding requests
An outgoing channel waits in BT_CONNECT until security
and the feature mask exchange complete, and only then
sends its connection request. A peer can answer it
before that with a connection response matching our
source CID. The channel then moves to BT_CONFIG,
completes configuration and becomes connected before
security has completed. If security then fails,
l2cap_security_cfm() leaves the connected channel
alone, so it stays up on a link that did not reach
the required security level.
A connection response with a zero source CID is
matched by identifier. Another channel can hold the
same identifier for a response it still has to send,
so the lookup can pick the wrong channel.
Only accept a connection response while our request
is outstanding, and only look at such channels when
matching by identifier.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Siwei Zhang <oss@fourdim.xyz>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
