iommu/s390: Fix memory corruption when using identity domain
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iommu/s390: Fix memory corruption when using identity domain
zpci_get_iommu_ctrs() returns counter information to be reported as part of device statistics; these counters are stored as part of the s390_domain. The problem, however, is that the identity domain is not backed by an s390_domain and so the conversion via to_s390_domain() yields a bad address that is zero'd initially and read on-demand later via a sysfs read. These counters aren't necessary for the identity domain; just return NULL in this case.
This issue was discovered via KASAN with reports that look like: BUG: KASAN: global-out-of-bounds in zpci_fmb_enable_device when using the identity domain for a device on s390.
From the CVE record · Linux
On s390, requesting device statistics for a device using an identity domain can cause an out-of-bounds memory access. The faulty counter lookup occurs when the identity domain is used, with the counters later read through sysfs. The input does not establish an attacker path or authentication requirements.
Engineers running the Linux kernel on s390 with devices using an IOMMU identity domain should check their systems; affected versions are not specified.