In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: ISO: fix leaking sk after socket release
isosockkill() tests !sockflag(sk, SOCKZAPPED) || sk->sksocket || sockflag(sk, SOCKDEAD) for early return, but this is always true since sockorphan(sk) sets SOCKDEAD, so the sk reference released by socket always leaks, isosockdestruct is never called.
The socket reference also leaks when isosockclose() does not set SOCKZAPPED, since isoconndel() does not call isosockkill() after zapping.
Fix by replacing SOCKDEAD by BTSKKILLED flag that is not used for something else, and locksock to ensure isosockkill() puts sk only after socket release only once. Release and isoconndel may run concurrently. Call isosockkill() from isoconndel() to clean sk up after zapping.
Remove call to isosockkill() from isosockclose(), as it's generally no-op there.