mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 12:20:56 +00:00

Bug 1596930 added support for detouring a pattern of code used by eScan Internet Security Suite. The patch also added tests to make sure that we correctly detour this pattern. The pattern involves a PUSH instruction followed by a RET instruction. This pattern is forbidden by Intel CET, which enforces at RET time that we always return to an address that was pushed on the stack by a prior CALL instruction. Executing the pattern thus crashes if Intel CET is active. If CET is active, we must thus skip the execution part of the test, or the test crashes. We will still check that our detouring code recognized the pattern and detoured it, but we will not run the detoured pattern anymore under active Intel CET. Differential Revision: https://phabricator.services.mozilla.com/D163468