This is a note to let you know that I've just added the patch titled dm integrity: Fix UAF in dm_integrity_dtr() to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: dm-integrity-fix-uaf-in-dm_integrity_dtr.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From f50cb2cbabd6c4a60add93d72451728f86e4791c Mon Sep 17 00:00:00 2001 From: Luo Meng <luomeng12@xxxxxxxxxx> Date: Tue, 29 Nov 2022 10:48:50 +0800 Subject: dm integrity: Fix UAF in dm_integrity_dtr() From: Luo Meng <luomeng12@xxxxxxxxxx> commit f50cb2cbabd6c4a60add93d72451728f86e4791c upstream. Dm_integrity also has the same UAF problem when dm_resume() and dm_destroy() are concurrent. Therefore, cancelling timer again in dm_integrity_dtr(). Cc: stable@xxxxxxxxxxxxxxx Fixes: 7eada909bfd7a ("dm: add integrity target") Signed-off-by: Luo Meng <luomeng12@xxxxxxxxxx> Signed-off-by: Mike Snitzer <snitzer@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/md/dm-integrity.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -4539,6 +4539,8 @@ static void dm_integrity_dtr(struct dm_t BUG_ON(!RB_EMPTY_ROOT(&ic->in_progress)); BUG_ON(!list_empty(&ic->wait_list)); + if (ic->mode == 'B') + cancel_delayed_work_sync(&ic->bitmap_flush_work); if (ic->metadata_wq) destroy_workqueue(ic->metadata_wq); if (ic->wait_wq) Patches currently in stable-queue which might be from luomeng12@xxxxxxxxxx are queue-5.15/dm-integrity-fix-uaf-in-dm_integrity_dtr.patch queue-5.15/dm-clone-fix-uaf-in-clone_dtr.patch queue-5.15/dm-thin-resume-even-if-in-fail-mode.patch queue-5.15/dm-cache-fix-uaf-in-destroy.patch queue-5.15/dm-thin-fix-uaf-in-run_timer_softirq.patch