Translating vaddubm on big-endian PowerPC corrupts the heap and aborts
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- reverse-engineering
Hướng nghiên cứu
Bắt đầu từ điểm vào pypcode.Context.translate và tái hiện trường hợp vaddubm bốn byte cho PowerPC:BE:32:default và PowerPC:BE:64:default. Truy vết đường dẫn dịch PowerPC big-endian và so sánh với trường hợp little-endian không gây hủy tiến trình. Hoàn tất khi đầu vào vaddubm hợp lệ không còn làm hỏng heap hoặc khiến tiến trình bị hủy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS
Translating a single ordinary AltiVec instruction corrupts the heap and aborts
the process. Four bytes are enough, and the input is valid PowerPC — not
malformed or random data.
import pypcode
pypcode.Context("PowerPC:BE:32:default").translate(
b"\x10\x00\x00\x00", 0x1000,
max_instructions=99999, max_bytes=4,
flags=pypcode.TranslateFlags.BB_TERMINATING,
)
The process dies with SIGABRT and glibc reports heap corruption — variously
free(): invalid size and corrupted size vs. prev_size, which indicates an
out-of-bounds write rather than a bad read.
On big-endian PowerPC, 10 00 00 00 decodes as vaddubm v0,v0,v0 — vector add
unsigned byte modulo, an unremarkable AltiVec instruction that a compiler will
emit for ordinary vectorised code.
What I verified
| language | result |
|---|---|
PowerPC:BE:32:default |
SIGABRT, heap corruption reported by glibc |
PowerPC:BE:64:default |
SIGABRT, heap corruption reported by glibc |
PowerPC:LE:32:default |
no abort — those bytes are not vaddubm in this byte order |
So the trigger tracks the instruction rather than the language variant, as one
would expect.
This is current master: the checkout used is 559aacdc, which is master at
the time of writing, and it also reproduces on the released 4.0.0 wheel from
PyPI in a clean virtual environment, so it does not depend on a source build.
Why it is worth attention
Any consumer that lifts PowerPC through Sleigh can be killed outright by four
bytes of legitimate input, with no exception to catch and no opportunity to skip
the block. It surfaced during a survey of a large binary corpus, where it
accounted for a small number of objects only because most PowerPC there routes
through a different lifter — the object count understates the exposure rather
than bounding it.
I have not attempted a fix, and I am not proposing one here; the report is the
contribution. Happy to test a patch against the same input if that helps.
- Ngôn ngữ chính
- C++
- Star
- 224
- Fork
- 33
- Merge trung bình
- 9 giờ 30 phút
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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.
Issue khác của angr/pypcode
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
angr/pypcode#293 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Update to Ghidra 12.1.2Có thể làm lại được @mborgerson đã nhận 139 ngày trước và không có pull request nào đang mở. Đang mởenhancement
angr/pypcode#276 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Build with freethreadingĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
devex good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
artifact:simulation-scenario domain:physics good first issue help wanted role:validation testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 3 ngày
-
[BUG] `mx.qqmm` docs: the Args section names `global_scale`, but the parameter is `global_scale_x`Có thể đã có người làm @Redempt1onzzZZ đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
ml-explore/mlx#4815 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày