Vulnerability · Published Mar 21, 2023 · Assigned by XEN
CVE-2022-42332
High 7.8
In plain English
A high-severity security flaw in xen from Xen. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 19% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
x86 shadow plus log-dirty mode use-after-free In environments where host assisted address translation is necessary but Hardware Assisted Paging (HAP) is unavailable, Xen will run guests in so called shadow mode. Shadow mode maintains a pool of memory used for both shadow page tables as well as auxiliary data structures. To migrate or snapshot guests, Xen additionally runs them in so called log-dirty mode. The data structures needed by the log-dirty tracking are part of aformentioned auxiliary data. In order to keep error handling efforts within reasonable bounds, for operations which may require memory allocations shadow mode logic ensures up front that enough memory is available for the worst case requirements. Unfortunately, while page table memory is properly accounted for on the code path requiring the potential establishing of new shadows, demands by the log-dirty infrastructure were not taken into consideration. As a result, just established shadow page tables could be freed again immediately, while other code is still accessing them on the assumption that they would remain allocated.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | xen | 4.17.0-r5 | ALPINE-CVE-2022-42332 |
| Alpine:v3.21 | xen | 4.17.0-r5 | ALPINE-CVE-2022-42332 |
| Alpine:v3.22 | xen | 4.17.0-r5 | ALPINE-CVE-2022-42332 |
| Alpine:v3.23 | xen | 4.17.0-r5 | ALPINE-CVE-2022-42332 |
| Alpine:v3.24 | xen | 4.17.0-r5 | ALPINE-CVE-2022-42332 |
| Debian:12 | xen | 4.17.0+74-g3eac216e6e-1 | DEBIAN-CVE-2022-42332 |
| Debian:13 | xen | 4.17.0+74-g3eac216e6e-1 | DEBIAN-CVE-2022-42332 |
| Debian:14 | xen | 4.17.0+74-g3eac216e6e-1 | DEBIAN-CVE-2022-42332 |
| Ubuntu:22.04:LTS | xen | no fix listed | UBUNTU-CVE-2022-42332 |
| Ubuntu:24.04:LTS | xen | no fix listed | UBUNTU-CVE-2022-42332 |
| Ubuntu:25.10 | xen | no fix listed | UBUNTU-CVE-2022-42332 |
| Ubuntu:26.04:LTS | xen | no fix listed | UBUNTU-CVE-2022-42332 |
| Ubuntu:26.10 | xen | no fix listed | UBUNTU-CVE-2022-42332 |
Affected products (as reported)
References
- https://xenbits.xenproject.org/xsa/advisory-427.txt
- http://xenbits.xen.org/xsa/advisory-427.html
- [oss-security] 20230321 Xen Security Advisory 427 v2 (CVE-2022-42332) - x86 shadow plus log-dirty mode use-after-free mailing-list
- FEDORA-2023-703f133eb3 vendor-advisory
- FEDORA-2023-da8315e641 vendor-advisory
- DSA-5378 vendor-advisory
- https://security.gentoo.org/glsa/202402-07