Skip to content
Heist/ feed
Back to feed
HighFix available

xen — security advisory

Type: advisorySources: OSVAdvisory ID: ALPINE-CVE-2022-42332

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.

Products
xen
Affected versions
Not specified
Fixed versions
4.15.5-r0, 4.16.4-r0, 4.17.0-r5
CVEs
CVE-2022-42332
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 14:18 UTC · Revision 1

Source evidence

ALPINE-CVE-2022-42332

core-osv · Original source

Published 21 Mar 2023, 13:15 UTC

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.

osv:ALPINE-CVE-2022-42332

xen

Fixed versions: 4.15.5-r0

xen

Fixed versions: 4.16.4-r0

xen

Fixed versions: 4.16.4-r0

xen

Fixed versions: 4.17.0-r5

xen

Fixed versions: 4.17.0-r5

xen

Fixed versions: 4.17.0-r5

xen

Fixed versions: 4.17.0-r5

xen

Fixed versions: 4.17.0-r5

xen

Fixed versions: 4.17.0-r5

xen

Fixed versions: 4.17.0-r5

Complete source record
{
  "id": "136c464957153c8e5516ba44526a7a2e5cc11f0f7108282538b9aaf650bf9bd5",
  "url": "https://osv.dev/vulnerability/ALPINE-CVE-2022-42332",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ALPINE-CVE-2022-42332",
    "summary": "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.",
    "evidence": "osv:ALPINE-CVE-2022-42332",
    "products": [
      {
        "name": {
          "value": "xen",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.15.5-r0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "xen",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.16.4-r0",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "xen",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.16.4-r0",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "xen",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.17.0-r5",
            "evidence": "/affected/3/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "xen",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.17.0-r5",
            "evidence": "/affected/4/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "xen",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.17.0-r5",
            "evidence": "/affected/5/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "xen",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.17.0-r5",
            "evidence": "/affected/6/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "xen",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.17.0-r5",
            "evidence": "/affected/7/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "xen",
          "evidence": "/affected/8/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.17.0-r5",
            "evidence": "/affected/8/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "xen",
          "evidence": "/affected/9/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.17.0-r5",
            "evidence": "/affected/9/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "ALPINE-CVE-2022-42332",
      "aliases": [
        "ALPINE-CVE-2022-42332"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.2.0"
                },
                {
                  "fixed": "4.15.5-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "xen",
            "purl": "pkg:apk/alpine/xen?arch=source",
            "ecosystem": "Alpine:v3.15"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-42332.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.2.0"
                },
                {
                  "fixed": "4.16.4-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "xen",
            "purl": "pkg:apk/alpine/xen?arch=source",
            "ecosystem": "Alpine:v3.16"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-42332.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.2.0"
                },
                {
                  "fixed": "4.16.4-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "xen",
            "purl": "pkg:apk/alpine/xen?arch=source",
            "ecosystem": "Alpine:v3.17"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-42332.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.2.0"
                },
                {
                  "fixed": "4.17.0-r5"
                }
              ]
            }
          ],
          "package": {
            "name": "xen",
            "purl": "pkg:apk/alpine/xen?arch=source",
            "ecosystem": "Alpine:v3.18"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-42332.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.2.0"
                },
                {
                  "fixed": "4.17.0-r5"
                }
              ]
            }
          ],
          "package": {
            "name": "xen",
            "purl": "pkg:apk/alpine/xen?arch=source",
            "ecosystem": "Alpine:v3.19"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-42332.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.2.0"
                },
                {
                  "fixed": "4.17.0-r5"
                }
              ]
            }
          ],
          "package": {
            "name": "xen",
            "purl": "pkg:apk/alpine/xen?arch=source",
            "ecosystem": "Alpine:v3.20"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-42332.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.2.0"
                },
                {
                  "fixed": "4.17.0-r5"
                }
              ]
            }
          ],
          "package": {
            "name": "xen",
            "purl": "pkg:apk/alpine/xen?arch=source",
            "ecosystem": "Alpine:v3.21"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-42332.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.2.0"
                },
                {
                  "fixed": "4.17.0-r5"
                }
              ]
            }
          ],
          "package": {
            "name": "xen",
            "purl": "pkg:apk/alpine/xen?arch=source",
            "ecosystem": "Alpine:v3.22"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-42332.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.2.0"
                },
                {
                  "fixed": "4.17.0-r5"
                }
              ]
            }
          ],
          "package": {
            "name": "xen",
            "purl": "pkg:apk/alpine/xen?arch=source",
            "ecosystem": "Alpine:v3.23"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-42332.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.2.0"
                },
                {
                  "fixed": "4.17.0-r5"
                }
              ]
            }
          ],
          "package": {
            "name": "xen",
            "purl": "pkg:apk/alpine/xen?arch=source",
            "ecosystem": "Alpine:v3.24"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-42332.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-15T07:17:54.263974939Z",
      "provider": "osv",
      "upstream": [
        "CVE-2022-42332"
      ],
      "references": [
        "https://security.alpinelinux.org/vuln/CVE-2022-42332"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2022-42332",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 322001,
  "published_at": "2023-03-21T13:15:11.973+00:00"
}