First published: Tue Mar 21 2023(Updated: )
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.
Credit: security@xen.org security@xen.org
Affected Software | Affected Version | How to fix |
---|---|---|
debian/xen | <=4.11.4+107-gef32c7afa2-1 | 4.14.6-1 4.14.5+94-ge49571868d-1 4.17.1+2-gb773c48e36-1 4.17.2+55-g0b56bed864-1 |
Xen Xen | >=3.2.0 | |
Debian Debian Linux | =11.0 | |
Fedoraproject Fedora | =37 | |
Fedoraproject Fedora | =38 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2022-42332 is a vulnerability in Xen that allows a use-after-free condition in environments where host assisted address translation is necessary but Hardware Assisted Paging (HAP) is unavailable.
Xen runs guests in shadow mode, which maintains a pool of memory used for shadow page tables as well as auxiliary data structures.
Xen versions 4.14.6-1, 4.14.5+94-ge49571868d-1, 4.17.1+2-gb773c48e36-1, 4.17.2+55-g0b56bed864-1, and up to inclusive version 4.11.4+107-gef32c7afa2-1 are affected.
No, Xen is only affected in environments where host assisted address translation is necessary but Hardware Assisted Paging (HAP) is unavailable.
You can find more information about CVE-2022-42332 at the following references: [Openwall](https://www.openwall.com/lists/oss-security/2023/03/21/1), [Xen](https://xenbits.xen.org/xsa/advisory-427.html), [Debian Security Tracker](https://security-tracker.debian.org/tracker/CVE-2022-42332).