Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dm integrity: Fix UAF in dm_integrity_dtr()

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@vger.kernel.org
Fixes: 7eada909bfd7a ("dm: add integrity target")
Signed-off-by: Luo Meng <luomeng12@huawei.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>

authored by

Luo Meng and committed by
Mike Snitzer
f50cb2cb 6a459d8e

+2
+2
drivers/md/dm-integrity.c
··· 4558 4558 BUG_ON(!RB_EMPTY_ROOT(&ic->in_progress)); 4559 4559 BUG_ON(!list_empty(&ic->wait_list)); 4560 4560 4561 + if (ic->mode == 'B') 4562 + cancel_delayed_work_sync(&ic->bitmap_flush_work); 4561 4563 if (ic->metadata_wq) 4562 4564 destroy_workqueue(ic->metadata_wq); 4563 4565 if (ic->wait_wq)