JIT shim object drops GNU property notes (CET/BTI/PAC) from output binaries
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
Bug report
Bug description:
When building with --enable-experimental-jit the jit_shim.o object lacks GNU property notes for hardware security features. The linker removes all such properties from the output binaries when any input object lacks them.
The regression was introduced with 9633c5239daa which makes the shim being compiled as a regular object file.
You can reproduce it by using ./configure --enable-experimental-jit=yes-off CFLAGS="-fcf-protection" && make -j.
Before the aforementioned commit a readelf -n python | grep 'x86 feature' would show Properties: x86 feature: IBT, SHSTK, whereas now nothing.
This is the case as well for BTI/PAC/GCS for aarch64 when building with https://github.com/python/cpython/pull/130864 and -mbranch-protection=standard.
My testing included GCC15.2.1 for the interpreter and Clang 21.1.8 for the jit, on Fedora 43.
CPython versions tested on:
3.16, CPython main branch, 3.15
Operating systems tested on:
Linux
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện vấn đề với ./configure --enable-experimental-jit=yes-off CFLAGS="-fcf-protection" && make -j, sau đó kiểm tra đối tượng shim của JIT và tệp nhị phân python tạo ra bằng readelf -n. Theo dõi cách jit_shim.o được xây dựng dưới dạng một đối tượng thông thường sau commit 9633c5239daa. Công việc được xem là hoàn tất khi các GNU property notes vẫn còn trong các tệp nhị phân đầu ra đối với các tính năng bảo mật x86 và aarch64 được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- c, linux, python
- Lĩnh vực
- build-system, compilers, security
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100