[interpreter] Binary decoder rejects heap type indices >= 2^31 as malformed
Maintainer thường phản hồi trong vòng 1 ngà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
- 67/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ệ
- wasm
Hướng nghiên cứu
Start in interpreter/binary/decode.ml at the s33 decoding path around line 108, then compare how it handles the provided boundary indices 2^31 and 2^31 - 1. Run the interpreter against the included assert_invalid module and check the reported error. Done means 2^31 is decoded as a well-formed index and the module reports "unknown type" rather than "integer representation too long".
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A heap type index is any non-negative s33:
So an index of 2^31 or 2^32 - 1 is well-formed, and a module using it is invalid (unknown type), not malformed. The decoder wraps the s33 to a signed 32-bit integer first and reports "integer representation too long":
;; (type (func (param (ref null 2147483648))))
(assert_invalid
(module binary "\00asm" "\01\00\00\00"
"\01\0a\01\60\01\63\80\80\80\80\08\00")
"unknown type")
The interpreter fails this with integer representation too long. Index 2^31 - 1 (\ff\ff\ff\ff\07) is reported as "unknown type" as expected.
Tested at 340650f.
- Ngôn ngữ chính
- WebAssembly
- Star
- 3.5k
- Fork
- 540
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc 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.
Issue khác của WebAssembly/spec
-
[interpreter] Text lexer accepts surrogate escapes and crashes on escapes past U+10FFFFCó thể đã có người làm @rossberg đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
WebAssembly/spec#2287 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[spectec] SpecTec interpreter: array.new_data and array.init_data fail on arrays of v128Có thể đã có người làm @rossberg đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
WebAssembly/spec#2285 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[spectec] Tstringchar excludes \u{E000}..\u{E7FF}Có thể đã có người làm @rossberg đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
WebAssembly/spec#2284 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[interpreter] memory.grow on an i64 memory past 2^48 pages succeeds but allocates wrong amount (or crashes)Có thể đã có người làm @rossberg đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
WebAssembly/spec#2281 ·
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
WebAssembly/spec#2297 ·
Maintainer thường phản hồi trong vòng 1 ngày