Skip to content

[3.14] gh-128605: Add branch protections for x86_64 in asm_trampoline.S (#128606)#135077

Merged
vstinner merged 1 commit into
python:3.14from
stratakis:3.14_x86_64_branch_protections
Jun 3, 2025
Merged

[3.14] gh-128605: Add branch protections for x86_64 in asm_trampoline.S (#128606)#135077
vstinner merged 1 commit into
python:3.14from
stratakis:3.14_x86_64_branch_protections

Conversation

@stratakis

@stratakis stratakis commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

Apply Intel Control-flow Technology for x86-64 on asm_trampoline.S.

Required for mitigation against return-oriented programming (ROP) and Call or Jump Oriented Programming (COP/JOP) attacks.

Manual application is required for the assembly files.

See also: https://sourceware.org/annobin/annobin.html/Test-cf-protection.html

…poline.S (python#128606)

Apply Intel Control-flow Technology for x86-64 on asm_trampoline.S.

Required for mitigation against return-oriented programming (ROP)
and Call or Jump Oriented Programming (COP/JOP) attacks.

Manual application is required for the assembly files.

See also: https://sourceware.org/annobin/annobin.html/Test-cf-protection.html
@vstinner vstinner merged commit 899cca6 into python:3.14 Jun 3, 2025
44 checks passed
@vstinner vstinner added the needs backport to 3.13 bugs and security fixes label Jun 3, 2025
@miss-islington-app

Copy link
Copy Markdown

Thanks @stratakis for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 3, 2025
…poline.S (pythonGH-128606) (pythonGH-135077)

Apply Intel Control-flow Technology for x86-64 on asm_trampoline.S.

Required for mitigation against return-oriented programming (ROP)
and Call or Jump Oriented Programming (COP/JOP) attacks.

Manual application is required for the assembly files.

See also: https://sourceware.org/annobin/annobin.html/Test-cf-protection.html
(cherry picked from commit 899cca6)

Co-authored-by: stratakis <cstratak@redhat.com>
@bedevere-app

bedevere-app Bot commented Jun 3, 2025

Copy link
Copy Markdown

GH-135083 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jun 3, 2025
@vstinner vstinner added the needs backport to 3.12 only security fixes label Jun 3, 2025
@miss-islington-app

Copy link
Copy Markdown

Thanks @stratakis for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @stratakis and @vstinner, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 899cca6dbf76bf3e06a99f60a5f996ad6ba0761f 3.12

@vstinner

vstinner commented Jun 3, 2025

Copy link
Copy Markdown
Member

@stratakis: It seems like Python 3.12 branch also requires special care. Can you try to backport the change manually?

vstinner pushed a commit that referenced this pull request Jun 3, 2025
….S (GH-128606) (GH-135077) (#135083)

[3.14] gh-128605: Add branch protections for x86_64 in asm_trampoline.S (GH-128606) (GH-135077)

Apply Intel Control-flow Technology for x86-64 on asm_trampoline.S.

Required for mitigation against return-oriented programming (ROP)
and Call or Jump Oriented Programming (COP/JOP) attacks.

Manual application is required for the assembly files.

See also: https://sourceware.org/annobin/annobin.html/Test-cf-protection.html
(cherry picked from commit 899cca6)

Co-authored-by: stratakis <cstratak@redhat.com>
encukou added a commit to encukou/cpython that referenced this pull request Jun 5, 2025
…asm_trampoline.S (python#128606) (python#135077)"

This reverts commit 899cca6,
which broke buildbots.
@bedevere-app

bedevere-app Bot commented Jun 5, 2025

Copy link
Copy Markdown

GH-135175 is a backport of this pull request to the 3.14 branch.

encukou added a commit that referenced this pull request Jun 6, 2025
……ampoline.S (#128606) (#135077)" (GH-135175)

This reverts commit 899cca6,
which broke buildbots.
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 6, 2025
…asm_tr…ampoline.S (pythonGH-128606) (pythonGH-135077)" (pythonGH-135175)

This reverts commit 899cca6,
which broke buildbots.
(cherry picked from commit b477e21)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
encukou added a commit that referenced this pull request Jun 6, 2025
……ampoline.S (GH-128606) (GH-135077)" (GH-135175) (GH-135203)

[3.14] gh-128605: Revert "Add branch protections for x86_64 in asm_tr…ampoline.S (GH-128606) (GH-135077)" (GH-135175)

This reverts commit 899cca6,
which broke buildbots.
(cherry picked from commit b477e21)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@encukou

encukou commented Aug 15, 2025

Copy link
Copy Markdown
Member

This was backported to 3.12 in #135094.

@encukou encukou removed the needs backport to 3.12 only security fixes label Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants