From defdcb714e0c8113ade899e416d3024ac8024548 Mon Sep 17 00:00:00 2001 From: Joshua Peraza Date: Tue, 26 Jul 2022 19:20:10 -0700 Subject: [PATCH] arm64: strip PACs from return addresses found from CFI Bug: b/239086293 Change-Id: I8b514e8640f0f2496cea8d0b516124c0e3a3b81a Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3788698 Reviewed-by: Mark Mentovai --- src/processor/stackwalker_arm64.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/processor/stackwalker_arm64.cc b/src/processor/stackwalker_arm64.cc index 74410c9a..71814c2d 100644 --- a/src/processor/stackwalker_arm64.cc +++ b/src/processor/stackwalker_arm64.cc @@ -170,6 +170,8 @@ StackFrameARM64* StackwalkerARM64::GetCallerByCFIFrameInfo( if ((frame->context_validity & essentials) != essentials) return NULL; + frame->context.iregs[MD_CONTEXT_ARM64_REG_PC] = + PtrauthStrip(frame->context.iregs[MD_CONTEXT_ARM64_REG_PC]); frame->trust = StackFrame::FRAME_TRUST_CFI; return frame.release(); }