Skip to content
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

Fix possible integer overflow in loader target block check #3133

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

wenyongh
Copy link
Contributor

@wenyongh wenyongh commented Feb 5, 2024

Checking with loader_ctx->csp_num < depth + 1 has potential integer overflow
issue when depth is UINT_MAX, change to loader_ctx->csp_num - 1 < depth
instead.

Reported in #3130.

@wenyongh wenyongh merged commit b8ff98c into bytecodealliance:main Feb 5, 2024
395 of 397 checks passed
wenyongh added a commit that referenced this pull request Feb 17, 2024
Apply patches in branch main for branch `release/1.3.x`:
- Fix loader check_wasi_abi_compatibility (#3126)
- Zero the memory mapped from os_mmap in NuttX (#3132)
- Fix possible integer overflow in loader target block check (#3133)
- Fix locel.set in polymorphic stack (#3135)
- Fix threads opcodes' boundary check in classic-interp and fast-interp (#3136)
- aot_compile_op_call: Stop setting calling convention explicitly (#3140)
- aot compiler: Place precheck wrapper before the corresponding wrapped function (#3141)
- fast-interp: Fix copy_stack_top_i64 overlap issue (#3146)
- fast-interp: Fix frame_offset overflow issue (#3149)
- Fix null pointer access in fast-interp when configurable soft bound check is enabled (#3150)
@wenyongh wenyongh deleted the fix_loader_check_br branch February 18, 2024 02:39
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
…lliance#3133)

Checking with `loader_ctx->csp_num < depth + 1` has potential integer overflow
issue when depth is UINT_MAX, change to `loader_ctx->csp_num - 1 < depth`
instead.

Reported in bytecodealliance#3130.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant