VMX: intercept issue with INVLPG on non-canonical address

2016-01-20T12:00:00
ID XSA-168
Type xen
Reporter Xen Project
Modified 2016-01-20T12:08:00

Description

ISSUE DESCRIPTION

While INVLPG does not cause a General Protection Fault when used on a non-canonical address, INVVPID in its "individual address" variant, which is used to back the intercepted INVLPG in certain cases, fails in such cases. Failure of INVVPID results in a hypervisor bug check.

IMPACT

A malicious guest can crash the host, leading to a Denial of Service.

VULNERABLE SYSTEMS

Xen versions from 3.3 onwards are affected. Only systems using Intel or Cyrix CPUs are affected. ARM and AMD systems are unaffected. Only HVM guests using shadow mode paging can expose this vulnerability. PV guests, and HVM guests using Hardware Assisted Paging (also known as EPT on affected hardware), are unaffected. Note that while unsupported, guests with enabled nested virtualization are vulnerable even when using EPT. CHECKING FOR VULNERABLE CONFIGURATION To discover whether your HVM guests are using HAP, or shadow page tables: request debug key q' (from the Xen console, or withxl debug-keys q'). This will print (to the console, and visible in xl dmesg'), debug information for every domain, containing something like this: (XEN) General information for domain 2: (XEN) refcnt=1 dying=2 pause_count=2 (XEN) nr_pages=2 xenheap_pages=0 shared_pages=0 paged_pages=0 dirty_cpus={} max_pages=262400 (XEN) handle=ef58ef1a-784d-4e59-8079-42bdee87f219 vm_assist=00000000 (XEN) paging assistance: hap refcounts translate external ^^^ The presence ofhap' here indicates that the host is not vulnerable to this domain. For an HVM domain the presence of shadow' indicates that the domain can exploit the vulnerability. Note thatGeneral information' will also be printed for PV domains. For most PV domains there will be no paging assistance' reported. But PV guests currently being migrated will report (XEN) paging assistance: shadow log_dirty Overall: a domain can exploit the vulnerability if this debug output contains apaging assistance' line which reports translate' and which does not reporthap'.