Skip to content

Conversation

@janvorli
Copy link
Member

@janvorli janvorli commented Jul 19, 2021

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.

Contributes to #47309

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.
@janvorli janvorli added this to the 6.0.0 milestone Jul 19, 2021
@janvorli janvorli requested review from jkotas and kouvel July 19, 2021 18:15
@janvorli janvorli self-assigned this Jul 19, 2021
endif (CLR_CMAKE_HOST_ARCH_I386)

if (CLR_CMAKE_HOST_ARCH_AMD64)
list (APPEND ASM_OPTIONS /guard:ehcont)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is necessary, I enabled the flag for all asm files in #55942

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, great! This was a remainder of my previous state.

endif (CLR_CMAKE_HOST_ARCH_I386)

if (CLR_CMAKE_HOST_ARCH_AMD64)
set_source_files_properties(${VM_SOURCES_WKS_ARCH_ASM} PROPERTIES COMPILE_FLAGS "/guard:ehcont")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is necessary, I enabled the flag for all asm files in #55942

@janvorli janvorli merged commit 51886d1 into dotnet:main Jul 26, 2021
@janvorli janvorli deleted the implement-new-ra-hijacking branch July 26, 2021 14:39
@ghost ghost locked as resolved and limited conversation to collaborators Aug 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants