[CFI] Make calls to libunity functions CFI-icall safe
Control Flow Integrity [1] indirect call (cfi-icall) checking can not verify that dynamically resolved function pointers call their intended function. Instead we place the function pointer ProtectedMemory, a wrapper for keeping variables in read-only memory except for when they are initialized. After setting the pointer in protected memory we can use the UnsanitizedCfiCall wrapper to disable cfi-icall checking when calling it since we know it can not be tampered with. [1] https://www.chromium.org/developers/testing/control-flow-integrity BUG=1014902 R=thestig Change-Id: Id55510f4d924bf8d4dd73332b7a8b18a9e6bc04c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1864377 Auto-Submit: Thomas Anderson <thomasanderson@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by:Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#706822}
Showing
Please register or sign in to comment