CVE-2023-46841
JSON

6.5medium

x86: shadow stack vs exceptions from emulation stubs

Severity
6.5medium CVSS:3.1 by CISA-ADP
Exploit likelihood
0.27% (higher than 20% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
XEN

Description

Recent x86 CPUs offer functionality named Control-flow Enforcement Technology (CET). A sub-feature of this are Shadow Stacks (CET-SS). CET-SS is a hardware feature designed to protect against Return Oriented Programming attacks. When enabled, traditional stacks holding both data and return addresses are accompanied by so called "shadow stacks", holding little more than return addresses. Shadow stacks aren't writable by normal instructions, and upon function returns their contents are used to check for possible manipulation of a return address coming from the traditional stack. In particular certain memory accesses need intercepting by Xen. In various cases the necessary emulation involves kind of replaying of the instruction. Such replaying typically involves filling and then invoking of a stub. Such a replayed instruction may raise an exceptions, which is expected and dealt with accordingly. Unfortunately the interaction of both of the above wasn't right: Recovery involves removal of a call frame from the (traditional) stack. The counterpart of this operation for the shadow stack was missing.

Affected

Product or packageVersionsReported by
Xen Xenconsult Xen advisory XSA-451, from 4.14.0CVE List, NVD
fedoraproject fedora40NVD

Classification

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Recent x86 CPUs offer functionality named Control-flow Enforcement Technology (CET). A sub-feature of this are Shadow Stacks (CET-SS). CET-SS is a hardware feature designed to protect against Return Oriented Programming attacks. When enabled, traditional stacks holding both data and return addresses are accompanied by so called "shadow stacks", holding little more than return addresses. Shadow stacks aren't writable by normal instructions, and upon function returns their contents are used to check for possible manipulation of a return address coming from the traditional stack. In particular certain memory accesses need intercepting by Xen. In various cases the necessary emulation involves kind of replaying of the instruction. Such replaying typically involves filling and then invoking of a stub. Such a replayed instruction may raise an exceptions, which is expected and dealt with accordingly. Unfortunately the interaction of both of the above wasn't right: Recovery involves removal of a call frame from the (traditional) stack. The counterpart of this operation for the shadow stack was missing.

NVD (es)

Las CPU x86 recientes ofrecen una funcionalidad denominada Control-flow Enforcement Technology (CET). Una subcaracterística de esto son Shadow Stacks (CET-SS). CET-SS es una característica de hardware manipulada para proteger contra ataques de programación orientada al retorno. Cuando están habilitadas, las pilas tradicionales que contienen datos y direcciones de retorno van acompañadas de las llamadas "pilas ocultas", que contienen poco más que direcciones de retorno. Las pilas de sombra no se pueden escribir mediante instrucciones normales y, cuando la función regresa, su contenido se usa para verificar una posible manipulación de una dirección de retorno proveniente de la pila tradicional. En particular, ciertos accesos a la memoria necesitan ser interceptados por Xen. En varios casos, la emulación necesaria implica una especie de repetición de la instrucción. Esta reproducción normalmente implica llenar y luego invocar un trozo. Una instrucción repetida de este tipo puede generar excepciones, lo cual se espera y se trata en consecuencia. Desafortunadamente, la interacción de los dos anteriores no fue correcta: la recuperación implica la eliminación de un marco de llamada de la pila (tradicional). Faltaba la contraparte de esta operación para la pila de sombra.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-46841 changed 2025-11-04CVE Terms of Use
NVDCVE-2023-46841 changed 2026-06-17Public domain