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 cache: Fix UAF in destroy()

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

Therefore, cancelling timer again in destroy().

Cc: stable@vger.kernel.org
Fixes: c6b4fcbad044e ("dm: add cache 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
6a459d8e e4b5957c

+1
+1
drivers/md/dm-cache-target.c
··· 1887 1887 if (cache->prison) 1888 1888 dm_bio_prison_destroy_v2(cache->prison); 1889 1889 1890 + cancel_delayed_work_sync(&cache->waker); 1890 1891 if (cache->wq) 1891 1892 destroy_workqueue(cache->wq); 1892 1893