[dm-devel v2 2/4] dm clone: Fix UAF in clone_dtr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dm_clone also has the same UAF problem when dm_resume()
and dm_destroy() are concurrent.

Therefore, canceling timer again in clone_dtr().

Fixes: 7431b7835f554 (dm: add clone target)
Signed-off-by: Luo Meng <luomeng12@xxxxxxxxxx>
---
 drivers/md/dm-clone-target.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/md/dm-clone-target.c b/drivers/md/dm-clone-target.c
index 2f1cc66d2641..29e0b85eeaf0 100644
--- a/drivers/md/dm-clone-target.c
+++ b/drivers/md/dm-clone-target.c
@@ -1958,6 +1958,7 @@ static void clone_dtr(struct dm_target *ti)
 
 	mempool_exit(&clone->hydration_pool);
 	dm_kcopyd_client_destroy(clone->kcopyd_client);
+	cancel_delayed_work_sync(&clone->waker);
 	destroy_workqueue(clone->wq);
 	hash_table_exit(clone);
 	dm_clone_metadata_close(clone->cmd);
-- 
2.31.1

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux