Implement new way of return address hijacking (#55946)
authorJan Vorlicek <jan.vorlicek@volny.cz>
Mon, 26 Jul 2021 14:39:22 +0000 (16:39 +0200)
committerGitHub <noreply@github.com>
Mon, 26 Jul 2021 14:39:22 +0000 (16:39 +0200)
commit51886d1b56eed00dcde92a2efc448071c1cf49b6
treee0a3ed385e5c6eb9ee97d997d9901cc87d0d50bc
parent49d88890b7d3971054e7a4026d2a508172b5d222
Implement new way of return address hijacking (#55946)

* Implement new way of return address hijacking

This change implements a new way of return address hijacking for Intel
CET enabled Windows devices. It uses a mechanism created by the Windows
team for this purpose. The existing mechanism that just patches the
return address by an address of our helper routine would result in
process killing as it would seem like a ROP exploit.
src/coreclr/vm/amd64/AsmHelpers.asm
src/coreclr/vm/amd64/cgenamd64.cpp
src/coreclr/vm/amd64/cgencpu.h
src/coreclr/vm/excep.cpp
src/coreclr/vm/threadsuspend.cpp
src/coreclr/vm/threadsuspend.h