In the Linux kernel, the following vulnerability has been resolved: Bluetooth: L2CAP: hold chan in l2cap_ecred_conn_rsp() l2cap_chan_del() calls l2cap_chan_put() to drop the conn->chan_l reference. If this was the last reference, UAF follows. l2cap_ecred_conn_rsp() iterates chan_l list and calls l2cap_chan_del() on some members, without holding chan reference. Fix by holding refcount while using chan after l2cap_chan_del(). 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.
https://git.kernel.org/stable/c/f63c53051746bdf2167f3b960e59fff9cf6460ed
https://git.kernel.org/stable/c/c1bdb2ec71d1777ebb9f866ef77a86e4e10ce658
https://git.kernel.org/stable/c/bd817236f9ddce3d71cf4e7218e0ca00aed3f315
https://git.kernel.org/stable/c/b508a2a2d846ccc4c8f691e4e3dfca6f97dfe85a
https://git.kernel.org/stable/c/6b5ec0f50f5fa24edf25d038d0463be0241700ee
https://git.kernel.org/stable/c/6a4945894e77d9d9a79c263ec732f94006db57dc
https://git.kernel.org/stable/c/6192a2fcf3b3098ba7e21f268880b5bb5ec20c87
https://git.kernel.org/stable/c/40e77e4130cbb8eebff9596266e6495514441fb3