`HARNESS_START_WITH_MAXIMUM_SIZE_AND_PTR` (magic 3) ignores max size on x86_64, i386 and RISC-V

Đang mở
#412 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
73/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
security, testing

Hướng nghiên cứu

Start at src/arch/mod.rs lines 649–657 and trace how the x86_64, i386, and RISC-V arms select the magic-start buffer and size registers. Add a test for HARNESS_START_WITH_MAXIMUM_SIZE_AND_PTR that checks the maximum size is honored; the issue notes harness/test.c currently initializes size to 1024. Done when the affected architectures use the maximum-size register and the test covers this variant.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Where

Problem
Architecture::get_magic_start_buffer_ptr_size_ptr_val calls get_magic_start_buffer_ptr_size_ptr() for X86_64, I386 and Riscv; only Arm and Aarch64 call the _ptr_val variant.

Impact
The max-size register is ignored and the maximum is read from *size_ptr, which the docs say may be uninitialised for this variant: testcases truncated to 0, or a huge read loop. Untested because harness/test.c initialises size = 1024.

Suggested fix
Call get_magic_start_buffer_ptr_size_ptr_val() in the three arms. Add a test using this variant.

Status
Confirmed by reading the code at 79972db. Found by reading the code; not reproduced under SIMICS.

Ngôn ngữ chính
Rust
Star
335
Fork
26
Merge trung bình
1 ngày 50 phút
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của intel/tsffs

Tất cả issue của intel/tsffs

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.