{"id":"CVE-2026-98107","aliases":["CVE-2026-98107"],"related":[],"kind":"vulnerability","state":"published","title":"Bluetooth: L2CAP: fix out-of-bounds write in l2cap_ecred_connect","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: L2CAP: fix out-of-bounds write in l2cap_ecred_connect\n\nl2cap_chan_connect() tries to ensure there are no more than\nL2CAP_ECRED_CONN_SCID_MAX pending ECRED channels, so they fit in the\nsame L2CAP_ECRED_CONN_REQ that l2cap_ecred_connect() constructs.\n\nHowever, the check only counts deferred channels.  If 6 L2CAP sockets\nare connected at the same time in order DDDDND (D=deferred,\nN=non-deferred), the last can bump the total to max+1.  It results to\none __le16 written out of bounds of the scid array, and an invalid\nECRED_CONN_REQ being sent.\n\nFix by leaving room for the non-deferred pending ECRED channels in the\ncounting in l2cap_chan_connect(), so the limit can't be exceeded.\n\nMove counting under same critical section where the channel is added.\nAlthough race conditions involving this appear unreachable, it's easier\nto see.\n\nAlso add WARN_ON_ONCE check in l2cap_ecred_defer_connect() to make this\nless brittle.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: L2CAP: fix out-of-bounds write in l2cap_ecred_connect\n\nl2cap_chan_connect() tries to ensure there are no more than\nL2CAP_ECRED_CONN_SCID_MAX pending ECRED channels, so they fit in the\nsame L2CAP_ECRED_CONN_REQ that l2cap_ecred_connect() constructs.\n\nHowever, the check only counts deferred channels.  If 6 L2CAP sockets\nare connected at the same time in order DDDDND (D=deferred,\nN=non-deferred), the last can bump the total to max+1.  It results to\none __le16 written out of bounds of the scid array, and an invalid\nECRED_CONN_REQ being sent.\n\nFix by leaving room for the non-deferred pending ECRED channels in the\ncounting in l2cap_chan_connect(), so the limit can't be exceeded.\n\nMove counting under same critical section where the channel is added.\nAlthough race conditions involving this appear unreachable, it's easier\nto see.\n\nAlso add WARN_ON_ONCE check in l2cap_ecred_defer_connect() to make this\nless brittle.","source":"cvelist"}],"published":"2026-09-25T10:35:56.340Z","modified":"2026-11-12T18:28:34.740Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"da49b602f7f75ccc91386e1274b3ef71676cd092","fixed":"fabc5e04f123225daf980d03f2c5a05e7f0f0a7f","status":"affected"},{"type":"git","introduced":"da49b602f7f75ccc91386e1274b3ef71676cd092","fixed":"ce0927eb3ee2939fab5ce3f9334bfd2fafb38481","status":"affected"},{"type":"git","introduced":"da49b602f7f75ccc91386e1274b3ef71676cd092","fixed":"6da5c0331fc3ef0c7b8df8269523fc3b2cce1e65","status":"affected"},{"type":"git","introduced":"da49b602f7f75ccc91386e1274b3ef71676cd092","fixed":"df8c3af6132640da4788e96a02d653e642059803","status":"affected"},{"type":"git","introduced":"da49b602f7f75ccc91386e1274b3ef71676cd092","fixed":"56c2b5831d39dc84aad2573dc3e197af1a872a05","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.7","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.7","status":"unaffected"},{"type":"semver","introduced":"6.6.160","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.111","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.53","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.2.7","lastAffected":"7.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.7","fixed":"6.6.160"},{"status":"affected","introduced":"6.7","fixed":"6.12.111"},{"status":"affected","introduced":"6.13","fixed":"6.18.53"},{"status":"affected","introduced":"6.19","fixed":"7.2.7"},{"status":"affected","version":"7.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/fabc5e04f123225daf980d03f2c5a05e7f0f0a7f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ce0927eb3ee2939fab5ce3f9334bfd2fafb38481","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6da5c0331fc3ef0c7b8df8269523fc3b2cce1e65","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/df8c3af6132640da4788e96a02d653e642059803","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/56c2b5831d39dc84aad2573dc3e197af1a872a05","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-98107","url":"https://www.cve.org/CVERecord?id=CVE-2026-98107","licence":"CVE Terms of Use","modified":"2026-10-21T12:54:32.791Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-98107","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98107","licence":"Public domain","modified":"2026-11-12T18:28:34.740Z"}],"updatedAt":"2026-11-25T22:59:41.063Z","epss":{"score":0.00129,"percentile":0.02721,"date":"2026-12-01T12:00:22.000Z"}}