CVE-2023-53482: iommu: Fix error unwind in iommu_group_alloc()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
iommu: Fix error unwind in iommu_group_alloc()
If either iommu_group_grate_file() fails then theiommu_group is leaked.
Destroy it on these error paths.
Found by kselftest/iommu/iommufd_fail_nth
The Linux kernel CVE team has assigned CVE-2023-53482 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.11 with commit bc7d12b91bd35477fd650c4d72b61239de9d9066 and fixed in 5.15.99 with commit f119ef452e2d82d912797273cb790a86f1125b3e Issue introduced in 4.11 with commit bc7d12b91bd35477fd650c4d72b61239de9d9066 and fixed in 6.1.16 with commit 4c23124b45ee0aa895ed8d5d08871ae6b15ee336 Issue introduced in 4.11 with commit bc7d12b91bd35477fd650c4d72b61239de9d9066 and fixed in 6.2.3 with commit 8602fa38a63fc689eca29c8c586fac2d8a1f8739 Issue introduced in 4.11 with commit bc7d12b91bd35477fd650c4d72b61239de9d9066 and fixed in 6.3 with commit 4daa861174d56023c2068ddb03de0752f07fa199
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-2023-53482
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/iommu/iommu.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/f119ef452e2d82d912797273cb790a86f1125b3e https://git.kernel.org/stable/c/4c23124b45ee0aa895ed8d5d08871ae6b15ee336 https://git.kernel.org/stable/c/8602fa38a63fc689eca29c8c586fac2d8a1f8739 https://git.kernel.org/stable/c/4daa861174d56023c2068ddb03de0752f07fa199