-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
asm_trampoline.S misses branch protection flags for x86_64 and aarch64 #128605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
vstinner
pushed a commit
that referenced
this issue
Jun 3, 2025
…8606) 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
stratakis
added a commit
to stratakis/cpython
that referenced
this issue
Jun 3, 2025
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
stratakis
added a commit
to stratakis/cpython
that referenced
this issue
Jun 3, 2025
…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
pushed a commit
that referenced
this issue
Jun 3, 2025
….S (#128606) (#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
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
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>
vstinner
pushed a commit
that referenced
this issue
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>
stratakis
added a commit
to stratakis/cpython
that referenced
this issue
Jun 3, 2025
…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
It looks like the backports broke buildbots,see for example: |
Isn't it the same failure as #131038 ? |
encukou
added a commit
to encukou/cpython
that referenced
this issue
Jun 5, 2025
…asm_trampoline.S (python#128606) (python#135077)" This reverts commit 899cca6, which broke buildbots.
Maybe! |
encukou
added a commit
that referenced
this issue
Jun 6, 2025
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
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 issue
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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
asm_trampoline.S added here 6d791a9 misses the branch protections offered for the latest x86-64 and aarch64 processors.
For C code the compiler takes care of that however for the assembler files the relevant instructions need to be added manually.
This was discovered by running the annobin-annocheck tool on a Fedora machine:
$ annocheck --hardened libpython3.14.so.1.0
Relevant annobin documentation:
x86_64: https://sourceware.org/annobin/annobin.html/Test-cf-protection.html
aarch64: https://sourceware.org/annobin/annobin.html/Test-branch-protection.html
CPython versions tested on:
3.12, 3.13, 3.14, CPython main branch
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: