From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 095D1385C019; Tue, 7 Apr 2020 11:28:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 095D1385C019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586258917; bh=f87ejLdnCrHa52TcKP7iPXwxe5AnvZVVYI/7jL8L0gM=; h=From:To:Subject:Date:From; b=i9KFZNEjhXMrlHHd6kmeBirmTITCdmyWOFSPt1rmUDkCMpcx+9u9p7P/qzDvZaBgu Mn7+N7lgPPtoOP039kzBg1Xk5chBkx2Ntlty1qOCJyXQKuZUWujtR8GxShlNyzje2E OLAfarycarewUYgmSp+LhzmejVigPkeGG7NfuRgI= From: "nsz at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94514] New: aarch64: unwinding across mixed pac-ret and non-pac-ret frames is broken Date: Tue, 07 Apr 2020 11:28:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nsz at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 11:28:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94514 Bug ID: 94514 Summary: aarch64: unwinding across mixed pac-ret and non-pac-ret frames is broken Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: nsz at gcc dot gnu.org Target Milestone: --- libgcc unwinder on aarch64 fails to keep track of pauth state and may try to authenticate return addresses that were not signed causing a runtime crash. example c++ code that segfaults in the unwinder on a pauth enabled system: __attribute__((noinline, target("branch-protection=3Dpac-ret"))) static void do_throw (void) { throw 42; __builtin_abort (); } __attribute__((noinline, target("branch-protection=3Dnone"))) static void no_pac_ret (void) { do_throw (); __builtin_abort (); } int main () { try { no_pac_ret (); } catch (...) { return 0; } __builtin_abort (); }=