In the Linux kernel, the following vulnerability has been resolved:
block, bfq: fix uaf for accessing waker_bfqq after splitting
After commit 42c306ed7233 ("block, bfq: don't break merge chain in bfqsplitbfqq()"), if the current procress is the last holder of bfqq, the bfqq can be freed after bfqsplitbfqq(). Hence recored the bfqq and then access bfqq->wakerbfqq may trigger UAF. What's more, the wakerbfqq may in the merge chain of bfqq, hence just recored waker_bfqq is still not safe.
Fix the problem by adding a helper bfqwakerbfqq() to check if bfqq->waker_bfqq is in the merge chain, and current procress is the only holder.