{"id":"CVE-2026-99239","summary":"Bluetooth: L2CAP: refuse __l2cap_chan_add if chan already has conn","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: L2CAP: refuse __l2cap_chan_add if chan already has conn\n\nl2cap_chan may be linked to l2cap_conn at most once. This is assumed in\nseveral places, eg l2cap_chan_del cleanup.\n\nThere is a TOCTOU race where the invariant is violated:\n\n    [Task 1]                          [Task 2]\n    l2cap_chan_connect                l2cap_sock_bind\n      l2cap_chan_lock                   lock_sock\n      l2cap_state_change                if (sk-\u003esk_state != BT_OPEN)\n        chan-\u003estate = BT_CONNECT\n        l2cap_sock_state_change_cb      chan-\u003estate = BT_BOUND\n                                        sk-\u003esk_state = BT_BOUND\n          lock_sock \u003c------------------ release_sock\n          sk-\u003esk_state = BT_CONNECT\n\nl2cap_sock_connect() does not check sk-\u003esk_state, so since chan-\u003estate\nis now BT_BOUND, subsequent connect() ends up with second\n__l2cap_chan_add.\n\nExplicitly document and check the invariant in __l2cap_chan_add with\nWARN_ON_ONCE. The only callsite where it could be hit is\nl2cap_chan_connect, so add pre-check there to avoid relying on\nchan-\u003estate. chan-\u003estate read/write is not properly guarded currently so\nthere can be other TOCTOUC problems.\n\nAdd l2cap_lock_chan in l2cap_sock_bind() to guard chan-\u003estate write.","modified":"2026-11-13T04:07:33.365676329Z","published":"2026-11-02T16:06:43.262Z","related":["openSUSE-SU-2026:12497-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99239.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/10c705dd706aa93164ba41f2566f15206d6c178e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/52fe88e4ef87311eee32b45c65603e7c69e75e7d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/73820561d8cbfd3364a29b8fa77f1707f26029da"},{"type":"WEB","url":"https://git.kernel.org/stable/c/820579652b24ce277e0097cd65b42bd9b7b8bf07"},{"type":"WEB","url":"https://git.kernel.org/stable/c/85cc289eb08afa975375f838187369e68b429ee0"},{"type":"WEB","url":"https://git.kernel.org/stable/c/86b55991d3cd690e73c5ef8d20b75ae4905b357a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d3afd7803f9bc2a8c4270199497b60158b2fc647"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e618d928ec7f88cbeadfa3542adcac40f474e629"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fabaff1c59ff2cc89cb7e5bd0186a5e15f0c73b2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99239.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99239"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"8f90405a4a6f1f1880dc07996b47bf57c712bd8a"},{"fixed":"85cc289eb08afa975375f838187369e68b429ee0"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"32d783cafb46ff3ca58e6f9fd62c9c5f35eaf26b"},{"fixed":"820579652b24ce277e0097cd65b42bd9b7b8bf07"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"8922c7940bae9ce4b1736dddb6362370793835c2"},{"fixed":"e618d928ec7f88cbeadfa3542adcac40f474e629"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"91047a4396a8b1857a6f712a90cf33ec0012b189"},{"fixed":"fabaff1c59ff2cc89cb7e5bd0186a5e15f0c73b2"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0b0e2bf39cf99e458d991b9df253727e036a7d7d"},{"fixed":"52fe88e4ef87311eee32b45c65603e7c69e75e7d"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"d3b739db5dc6f688a60d56da872fabaf65246032"},{"fixed":"10c705dd706aa93164ba41f2566f15206d6c178e"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b66774b48dd98f07254951f74ea6f513efe7ff8b"},{"fixed":"73820561d8cbfd3364a29b8fa77f1707f26029da"},{"fixed":"d3afd7803f9bc2a8c4270199497b60158b2fc647"},{"fixed":"86b55991d3cd690e73c5ef8d20b75ae4905b357a"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"50c38d9f42a529691e4e67ea9cedf4f0bfc8d277"}]}],"versions":["v5.10.272","v5.10.271","v5.10.270","v5.10.269","v5.10.268","v5.10.267","v5.10.266","v5.10.265","v5.15.223","v5.15.222","v5.15.221","v5.15.220","v5.15.219","v5.15.218","v5.15.217","v5.15.216","v6.1.190","v6.1.189","v6.1.188","v6.1.187","v6.1.186","v6.1.185","v6.1.184","v6.1.183","v6.6.160","v6.6.159","v6.6.158","v6.6.157","v6.6.156","v6.6.155","v6.6.154","v6.6.153","v6.6.152","v6.6.151","v6.6.150","v6.6.149","v6.6.148","v6.6.147","v6.6.146","v6.6.145","v6.12.114","v6.12.113","v6.12.112","v6.12.111","v6.12.110","v6.12.109","v6.12.108","v6.12.107","v6.12.106","v6.12.105","v6.12.104","v6.12.103","v6.12.102","v6.12.101","v6.12.100","v6.12.99","v6.12.98","v6.12.97","v6.18.59","v6.18.58","v6.18.57","v6.18.56","v6.18.55","v6.18.54","v6.18.53","v6.18.52","v6.18.51","v6.18.50","v6.18.49","v6.18.48","v6.18.47","v6.18.46","v6.18.45","v6.18.44","v6.18.43","v6.18.42","v6.18.41","v6.18.40","v6.18.39","v7.1.13","v7.1.12","v7.1.11","v7.1.10","v7.1.9","v7.1.8","v7.1.7","v7.1.6","v7.1.5","v7.1.4"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-99239.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.10.265"},{"fixed":"5.10.273"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.15.216"},{"fixed":"5.15.224"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.1.183"},{"fixed":"6.1.191"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.6.145"},{"fixed":"6.6.161"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.12.97"},{"fixed":"6.12.115"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.18.39"},{"fixed":"6.18.60"}]},{"type":"ECOSYSTEM","events":[{"introduced":"7.1.4"},{"fixed":"7.2"}]},{"type":"ECOSYSTEM","events":[{"introduced":"7.2.0"},{"fixed":"7.2.14"}]},{"type":"ECOSYSTEM","events":[{"introduced":"7.3.0"},{"fixed":"7.3.1"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-99239.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}