CVE-2022-50510: perf/smmuv3: Fix hotplug callback leak in arm_smmu_pmu_init()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
perf/smmuv3: Fix hotplug callback leak in arm_smmu_pmu_init()
arm_smmu_pmu_init() won't remove the callback added by cpuhp_setup_state_multi() when platform_driver_register() failed. Remove the callback by cpuhp_remove_multi_state() in fail path.
Similar to the handling of arm_ccn_init() in commit 26242b330093 ("bus:
arm-ccn: Prevent hotplug callback leak")
The Linux kernel CVE team has assigned CVE-2022-50510 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.2 with commit 7d839b4b9e00645e49345d6ce5dfa8edf53c1a21 and fixed in 5.4.229 with commit d69bdb61d577297d3851fc9f6403574bf73ef41f Issue introduced in 5.2 with commit 7d839b4b9e00645e49345d6ce5dfa8edf53c1a21 and fixed in 5.10.163 with commit 359286f886feef38536eaa7e673dc3440f03b0a1 Issue introduced in 5.2 with commit 7d839b4b9e00645e49345d6ce5dfa8edf53c1a21 and fixed in 5.15.86 with commit b131304fe722853cf26e55c4fa21fc58a36e7f21 Issue introduced in 5.2 with commit 7d839b4b9e00645e49345d6ce5dfa8edf53c1a21 and fixed in 6.0.16 with commit f245ca9a0fe7f794a8187ad803d5e2ced5a11cb2 Issue introduced in 5.2 with commit 7d839b4b9e00645e49345d6ce5dfa8edf53c1a21 and fixed in 6.1.2 with commit 582babe17ea878ec1d76f30e03f3a6ce6e30eb91 Issue introduced in 5.2 with commit 7d839b4b9e00645e49345d6ce5dfa8edf53c1a21 and fixed in 6.2 with commit 6f2d566b46436a50a80d6445e82879686b89588c
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-50510
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/perf/arm_smmuv3_pmu.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/d69bdb61d577297d3851fc9f6403574bf73ef41f https://git.kernel.org/stable/c/359286f886feef38536eaa7e673dc3440f03b0a1 https://git.kernel.org/stable/c/b131304fe722853cf26e55c4fa21fc58a36e7f21 https://git.kernel.org/stable/c/f245ca9a0fe7f794a8187ad803d5e2ced5a11cb2 https://git.kernel.org/stable/c/582babe17ea878ec1d76f30e03f3a6ce6e30eb91 https://git.kernel.org/stable/c/6f2d566b46436a50a80d6445e82879686b89588c