Skip to content

Conversation

@stratakis
Copy link
Member

Apply protection against ROP/JOP attacks for aarch64 on asm_trampoline.S

The BTI flag must be applied in the assembler sources for this class of attacks to be mitigated on newer aarch64 processors.

Upstream PR: https://github.com/python/cpython/pull/130864/files

The upstream patch is incomplete but only for the case where frame pointers are not used on 3.13+.

Since on Fedora we always compile with frame pointers the BTI/PAC hardware protections can be enabled without losing Perf unwinding.

@vstinner
Copy link

vstinner commented Jun 3, 2025

I left a review upstream: python#130864 (review)

@stratakis stratakis changed the title 00464: Enable PAC and BTI protections for aarch64 [3.14] 00464: Enable PAC and BTI protections for aarch64 Jun 12, 2025
Apply protection against ROP/JOP attacks for aarch64 on asm_trampoline.S

The BTI flag must be applied in the assembler sources for this class
of attacks to be mitigated on newer aarch64 processors.

Upstream PR: https://github.com/python/cpython/pull/130864/files

The upstream patch is incomplete but only for the case where
frame pointers are not used on 3.13+.

Since on Fedora we always compile with frame pointers the BTI/PAC
hardware protections can be enabled without losing Perf unwinding.
@stratakis stratakis merged commit 83a657a into fedora-python:fedora-3.14 Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants