In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: fix dangling scoconn and use-after-free in scosock_timeout
Connecting the same socket twice consecutively in scosockconnect() could lead to a race condition where two scoconn objects are created but only one is associated with the socket. If the socket is closed before the SCO connection is established, the timer associated with the dangling scoconn object won't be canceled. As the sock object is being freed, the use-after-free problem happens when the timer callback function scosocktimeout() accesses the socket. Here's the call trace:
dumpstack+0x107/0x163 ? refcountinc+0x1c/ printaddressdescription.constprop.0+0x1c/0x47e ? refcountinc+0x1c/0x7b kasanreport+0x13a/0x173 ? refcountinc+0x1c/0x7b checkmemoryregion+0x132/0x139 refcountinc+0x1c/0x7b scosocktimeout+0xb2/0x1ba processonework+0x739/0xbd1 ? canceldelayedwork+0x13f/0x13f ? _rawspinlockinit+0xf0/0xf0 ? tokthread+0x59/0x85 workerthread+0x593/0x70e kthread+0x346/0x35a ? drainworkqueue+0x31a/0x31a ? kthreadbind+0x4b/0x4b retfromfork+0x1f/0x30