HIGH Introduced in 5.7
bluetooth L2CAP ECRED OOB
CVE-2026-98107
CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: L2CAP: fix out-of-bounds write in l2cap_ecred_connect l2cap_chan_connect() tries to ensure there are no more than L2CAP_ECRED_CONN_SCID_MAX pending ECRED channels, so they fit in the same L2CAP_ECRED_CONN_REQ that l2cap_ecred_connect() constructs. However, the check only counts deferred channels. If 6 L2CAP sockets are connected at the same time in order DDDDND (D=deferred, N=non-deferred), the last can bump the total to max+1. It results to one __le16 written out of bounds of the scid array, and an invalid ECRED_CONN_REQ being sent. Fix by leaving room for the non-deferred pending ECRED channels in the counting in l2cap_chan_connect(), so the limit can't be exceeded. Move counting under same critical section where the channel is added. Although race conditions involving this appear unreachable, it's easier to see. Also add WARN_ON_ONCE check in l2cap_ecred_defer_connect() to make this less brittle.
02KernelScan AI Analysis
Risk summary
A local unprivileged user with access to a Bluetooth interface can trigger a stack-based out-of-bounds write in the L2CAP ECRED connection path, potentially corrupting kernel stack data including pointers. Successful exploitation could lead to information disclosure, privilege escalation, or a system crash. The vulnerability requires Bluetooth to be enabled and an accessible local process that can create L2CAP sockets.
Vulnerability analysis
A counting flaw in the Bluetooth L2CAP extended-credit connection grouping allows one too many channels to be queued. When a local process connects several sockets in a particular mix of deferred and non-deferred modes, the final connection overruns a small on-stack array and writes past its boundary, corrupting an adjacent kernel pointer. The correction updates the count to include the non-deferred finishing channel, places the limit check under the same lock where channels are registered, defines the array size by a constant instead of a literal, and adds a fallback guard against future overruns. Any unprivileged local process with access to a Bluetooth device can reach the bug by opening and connecting L2CAP sockets in the required order; root or kernel capabilities are not required.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 5.7 | 6.12.111 | ce0927eb3ee2 |
| 6.18 | 5.7 | 6.18.53 | 6da5c0331fc3 |
| 7.2 | 5.7 | 7.2.7 | df8c3af61326 |
| mainline | 5.7 | 7.3-rc2 | 56c2b5831d39 |
| cip/6.12 | 5.7 | 6.12.111-cip32 | ce0927eb3ee2 |