In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: af_bluetooth: Fix deadlock
Attemting to do socklock on .recvmsg may cause a deadlock as shown bellow, so instead of using socksock this uses skreceivequeue.lock on btsockioctl to avoid the UAF:
INFO: task kworker/u9:1:121 blocked for more than 30 seconds. Not tainted 6.7.6-lemon #183 Workqueue: hci0 hcirxwork Call Trace: <TASK> _schedule+0x37d/0xa00 schedule+0x32/0xe0 _locksock+0x68/0xa0 ? _pfxautoremovewakefunction+0x10/0x10 locksocknested+0x43/0x50 l2capsockrecvcb+0x21/0xa0 l2caprecvframe+0x55b/0x30a0 ? psitaskswitch+0xeb/0x270 ? finishtaskswitch.isra.0+0x93/0x2a0 hcirxwork+0x33a/0x3f0 processonework+0x13a/0x2f0 workerthread+0x2f0/0x410 ? _pfxworkerthread+0x10/0x10 kthread+0xe0/0x110 ? _pfxkthread+0x10/0x10 retfromfork+0x2c/0x50 ? _pfxkthread+0x10/0x10 retfromfork_asm+0x1b/0x30 </TASK>