]> xenbits.xensource.com Git - xen.git/commit
x86: account for shadow stack in exception-from-stub recovery
authorJan Beulich <jbeulich@suse.com>
Tue, 27 Feb 2024 13:12:11 +0000 (14:12 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 27 Feb 2024 13:12:11 +0000 (14:12 +0100)
commit49f77602373b58b7bbdb40cea2b49d2f88d4003d
tree995ff5b76538e77b785a1f8cce41df1ac35dc716
parent91650010815f3da0834bc9781c4359350d1162a5
x86: account for shadow stack in exception-from-stub recovery

Dealing with exceptions raised from within emulation stubs involves
discarding return address (replaced by exception related information).
Such discarding of course also requires removing the corresponding entry
from the shadow stack.

Also amend the comment in fixup_exception_return(), to further clarify
why use of ptr[1] can't be an out-of-bounds access.

This is CVE-2023-46841 / XSA-451.

Fixes: 209fb9919b50 ("x86/extable: Adjust extable handling to be shadow stack compatible")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 91f5f7a9154919a765c3933521760acffeddbf28
master date: 2024-02-27 13:49:22 +0100
xen/arch/x86/extable.c
xen/arch/x86/include/asm/uaccess.h
xen/arch/x86/traps.c