CVE-2026-142907: Bluetooth: L2CAP: hold chan in l2cap_ecred_conn_rsp()
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: L2CAP: hold chan in l2capecredconnrsp()
l2capchandel() calls l2capchanput() to drop the conn->chanl reference. If this was the last reference, UAF follows.
l2capecredconnrsp() iterates chanl list and calls l2capchandel() on some members, without holding chan reference.
Fix by holding refcount while using chan after l2capchandel().
Since orig is looked up by dcid provided by remote, it's also possible orig == chan, so reference needs to be held also after orig use.
Affected Software
Event History
Frequently Asked Questions
What condition leads to the use-after-free?
The issue occurs when l2cap_chan_del() drops the conn->chan_l reference and that is the final reference to the channel. The response-handling code can then continue using the channel without holding its own reference.
Why must the original channel also be retained?
The original channel is looked up using a destination channel ID supplied by the remote peer, so it can be the same object as the channel being processed. A reference must remain held after using the original channel as well.