Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Fix hijacking for ARM/ARM64/x86 on Unix #20042

Merged
merged 4 commits into from
Sep 24, 2018

Conversation

janvorli
Copy link
Member

@janvorli janvorli commented Sep 19, 2018

We were not checking the case when we have interrupted a thread inside
of a function epilog for other architectures than amd64. When such an
interruption happens, GS cookie check in a stack walking has failed,
since we are unable to decode GS cookie location when the IP is in
epilog.
This fix implements IsIPInEpilog for all architectures and makes the
check unconditional.

Fixes #20015

We were not checking the case when we have interrupted a thread inside
of a function epilog for other architectures than amd64. When such an
interruption happens, GS cookie check in a stack walking has failed,
since we are unable to decode GS cookie location when the IP is in
epilog.
This fix implements IsIPInEpilog for all architectures and makes the
check unconditional.
@jkotas
Copy link
Member

jkotas commented Sep 19, 2018

Does this still allow return address hijacking to work for empty methods? I.e. Are there offsets within optimized virtual void foo() { } where IsIPInProlog returns false?

@jkotas
Copy link
Member

jkotas commented Sep 19, 2018

Build breaks on x86...

@janvorli
Copy link
Member Author

I've fixed the x86 build break. I have not realized that the IsIPInProlog/ Epilog cannot be compiled on Windows x86, but only on Linux x86.

@janvorli
Copy link
Member Author

@dotnet-bot test OSX10.12 x64 Checked Innerloop Build and Test

1 similar comment
@janvorli
Copy link
Member Author

@dotnet-bot test OSX10.12 x64 Checked Innerloop Build and Test

@janvorli
Copy link
Member Author

@dotnet-bot test Ubuntu arm Cross Checked Innerloop Build and Test

@janvorli
Copy link
Member Author

@dotnet-bot test OSX10.12 x64 Checked Innerloop Build and Test

1 similar comment
@janvorli
Copy link
Member Author

@dotnet-bot test OSX10.12 x64 Checked Innerloop Build and Test

@janvorli
Copy link
Member Author

@dotnet-bot test Ubuntu arm Cross Checked Innerloop Build and Test

@janvorli
Copy link
Member Author

@dotnet-bot test Ubuntu arm Cross Checked no_tiered_compilation_innerloop Build and Test

@janvorli
Copy link
Member Author

@dotnet-bot test Ubuntu arm Cross Checked Innerloop Build and Test

@janvorli
Copy link
Member Author

@dotnet-bot test Ubuntu arm Cross Checked no_tiered_compilation_innerloop Build and Test

@janvorli janvorli merged commit f398477 into dotnet:master Sep 24, 2018
@janvorli janvorli deleted the fix-arm-hijacking branch September 24, 2018 23:51
@sinisaz
Copy link

sinisaz commented Sep 28, 2018

Hi, how can I get noticed for the release of this fix?

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.

"Aborted" without any exception or messages
3 participants