[all-commits] [llvm/llvm-project] 4db687: [libunwind] Check corrupted return address in unwi...

jinge90 via All-commits all-commits at lists.llvm.org
Tue Nov 8 22:12:52 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4db687155bc12f31b5ed122ba1086c5f04838a24
      https://github.com/llvm/llvm-project/commit/4db687155bc12f31b5ed122ba1086c5f04838a24
  Author: jinge90 <ge.jin at intel.com>
  Date:   2022-11-09 (Wed, 09 Nov 2022)

  Changed paths:
    M libunwind/src/UnwindLevel1.c

  Log Message:
  -----------
  [libunwind] Check corrupted return address in unwind_phase2 when CET is enabled.

If CET shadow stack is enabled, we count the number of stack frames skipped
and adjust CET shadow stack based on the number in libunwind unwind_phase2.
At the same time, we can enhance security via comparing the return address in
normal stack against counterpart in CET shadow stack, if they don't match,
it means the return address stored in normal stack has been corrupted and we
will return _URC_FATAL_PHASE2_ERROR in that case.

Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D136667

Signed-off-by: jinge90 <ge.jin at intel.com>




More information about the All-commits mailing list