Stream: git-wasmtime

Topic: wasmtime / PR #8001 winch: Fix bounds checks for dynamic ...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 27 2024 at 18:27):

saulecabrera opened PR #8001 from saulecabrera:winch-fix-dynamic-heap-bounds to bytecodealliance:main:

This commit fixes a fuzz bug in which the current implementation was incorrectly clobbering the index register of a memory access (for addition overflow check) and then using that same clobbered register to perform the memory access. The clobbered register contained the value: index + offset + access_size, which resulting in an incorrect access and consequently in an incorrect HeapOutOfBounds trap.

This bug is only reproducible when modifying Wasmtime's memory settings, forcing the heap to be treated as Dynamic.

Currently in Winch there's no easy way to have specific Wasmtime configurations, so having a filetests for this case is not straightforward. I've opted to add an integration test, in which it's easier to configure Wasmtime.

Note that the tests/all/winch.rs file is temporary, and the plan is to execute all the other integration tests with Winch at some point. In the case of memory.rs, that will be once Winch supports memory64 hoping to reduce the amount of code needed in order to integrate Winch.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Feb 27 2024 at 18:27):

saulecabrera requested fitzgen for a review on PR #8001.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 27 2024 at 18:27):

saulecabrera requested wasmtime-compiler-reviewers for a review on PR #8001.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 27 2024 at 18:27):

saulecabrera requested wasmtime-core-reviewers for a review on PR #8001.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 27 2024 at 18:29):

saulecabrera requested elliottt for a review on PR #8001.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 27 2024 at 18:29):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 27 2024 at 18:30):

saulecabrera has enabled auto merge for PR #8001.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 27 2024 at 18:36):

saulecabrera updated PR #8001.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 27 2024 at 19:21):

saulecabrera merged PR #8001.


Last updated: Nov 22 2024 at 16:03 UTC