Skip to content

Implement new way of return address hijacking - #55946

Merged
janvorli merged 4 commits into
dotnet:mainfrom
janvorli:implement-new-ra-hijacking
Jul 26, 2021
Merged

Implement new way of return address hijacking#55946
janvorli merged 4 commits into
dotnet:mainfrom
janvorli:implement-new-ra-hijacking

Conversation

@janvorli

@janvorlijanvorli commented Jul 19, 2021

Copy link
Copy Markdown
Member

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.
@janvorlijanvorli added this to the 6.0.0 milestone Jul 19, 2021
@janvorli
janvorli requested review from jkotas and kouvelJuly 19, 2021 18:15
@janvorlijanvorli 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
Copy Markdown
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
Copy Markdown
MemberAuthor

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.

Comment threadsrc/coreclr/vm/wks/CMakeLists.txt Outdated
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
Copy Markdown
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:mainJul 26, 2021
@janvorli
janvorli deleted the implement-new-ra-hijacking branch July 26, 2021 14:39
@ghostghost locked as resolved and limited conversation to collaborators Aug 25, 2021
Sign up for freeto 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

@janvorli@kouvel