CVE-2022-50496: dm cache: Fix UAF in destroy()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
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().
The Linux kernel CVE team has assigned CVE-2022-50496 to this issue.
Affected and fixed versions
===========================
Issue introduced in 3.9 with commit c6b4fcbad044e6fffcc75bba160e720eb8d67d17 and fixed in 4.9.337 with commit 034cbc8d3b47a56acd89453c29632a9c117de09d Issue introduced in 3.9 with commit c6b4fcbad044e6fffcc75bba160e720eb8d67d17 and fixed in 4.14.303 with commit 993406104d2b28fe470126a062ad37a1e21e792e Issue introduced in 3.9 with commit c6b4fcbad044e6fffcc75bba160e720eb8d67d17 and fixed in 4.19.270 with commit 4d20032dd90664de09f2902a7ea49ae2f7771746 Issue introduced in 3.9 with commit c6b4fcbad044e6fffcc75bba160e720eb8d67d17 and fixed in 5.4.229 with commit 2f097dfac7579fd84ff98eb1d3acd41d53a485f3 Issue introduced in 3.9 with commit c6b4fcbad044e6fffcc75bba160e720eb8d67d17 and fixed in 5.10.163 with commit 2b17026685a270b2beaf1cdd9857fcedd3505c7e Issue introduced in 3.9 with commit c6b4fcbad044e6fffcc75bba160e720eb8d67d17 and fixed in 5.15.87 with commit d2a0b298ebf83ab6236f66788a3541e91ce75a70 Issue introduced in 3.9 with commit c6b4fcbad044e6fffcc75bba160e720eb8d67d17 and fixed in 6.0.18 with commit 6ac4f36910764cb510bafc4c3768544f86ca48ca Issue introduced in 3.9 with commit c6b4fcbad044e6fffcc75bba160e720eb8d67d17 and fixed in 6.1.4 with commit 6a3e412c2ab131c54945327a7676b006f000a209 Issue introduced in 3.9 with commit c6b4fcbad044e6fffcc75bba160e720eb8d67d17 and fixed in 6.2 with commit 6a459d8edbdbe7b24db42a5a9f21e6aa9e00c2aa
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2022-50496
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/md/dm-cache-target.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/034cbc8d3b47a56acd89453c29632a9c117de09d https://git.kernel.org/stable/c/993406104d2b28fe470126a062ad37a1e21e792e https://git.kernel.org/stable/c/4d20032dd90664de09f2902a7ea49ae2f7771746 https://git.kernel.org/stable/c/2f097dfac7579fd84ff98eb1d3acd41d53a485f3 https://git.kernel.org/stable/c/2b17026685a270b2beaf1cdd9857fcedd3505c7e https://git.kernel.org/stable/c/d2a0b298ebf83ab6236f66788a3541e91ce75a70 https://git.kernel.org/stable/c/6ac4f36910764cb510bafc4c3768544f86ca48ca https://git.kernel.org/stable/c/6a3e412c2ab131c54945327a7676b006f000a209 https://git.kernel.org/stable/c/6a459d8edbdbe7b24db42a5a9f21e6aa9e00c2aa