Bluetooth: L2CAP: fix out-of-bounds write in l2cap_ecred_connect
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.
CVE-2026-98107
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-98107
Linux
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Linux
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "da49b602f7f75ccc91386e1274b3ef71676cd092",
"lessThan": "fabc5e04f123225daf980d03f2c5a05e7f0f0a7f",
"versionType": "git"
},
{
"status": "affected",
"version": "da49b602f7f75ccc91386e1274b3ef71676cd092",
"lessThan": "ce0927eb3ee2939fab5ce3f9334bfd2fafb38481",
"versionType": "git"
},
{
"status": "affected",
"version": "da49b602f7f75ccc91386e1274b3ef71676cd092",
"lessThan": "6da5c0331fc3ef0c7b8df8269523fc3b2cce1e65",
"versionType": "git"
},
{
"status": "affected",
"version": "da49b602f7f75ccc91386e1274b3ef71676cd092",
"lessThan": "df8c3af6132640da4788e96a02d653e642059803",
"versionType": "git"
},
{
"status": "affected",
"version": "da49b602f7f75ccc91386e1274b3ef71676cd092",
"lessThan": "56c2b5831d39dc84aad2573dc3e197af1a872a05",
"versionType": "git"
}
],
"programFiles": [
"net/bluetooth/l2cap_core.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "5.7"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "5.7",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "6.6.160",
"versionType": "semver",
"lessThanOrEqual": "6.6.*"
},
{
"status": "unaffected",
"version": "6.12.111",
"versionType": "semver",
"lessThanOrEqual": "6.12.*"
},
{
"status": "unaffected",
"version": "6.18.53",
"versionType": "semver",
"lessThanOrEqual": "6.18.*"
},
{
"status": "unaffected",
"version": "7.2.7",
"versionType": "semver",
"lessThanOrEqual": "7.2.*"
},
{
"status": "unaffected",
"version": "7.3",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"net/bluetooth/l2cap_core.c"
],
"defaultStatus": "affected"
}
]- Related CVEs
- CVE-2026-98107
Source reference:
/cveMetadata/cveId
Publisher severity
No explicit severity was provided.
- Event
- #48852 · Revision 1
- Added to Heist Feed
- Publisher date