Stream: git-wasmtime

Topic: wasmtime / PR #4112 Fix an issue where massive memory ima...


view this post on Zulip Wasmtime GitHub notifications bot (May 09 2022 at 15:12):

alexcrichton opened PR #4112 from fix-memory-image-size to main:

This commit fixes an issue introduced in #4046 where the checks for
ensuring that the memory initialization image for a module was
constrained in its size failed to trigger and a very small module could
produce an arbitrarily large memory image.

The bug in question was that if a module only had empty data segments at
arbitrarily small and large addresses then the loop which checks whether
or not the image is allowed was skipped entirely since it was seen that
the memory had no data size. The fix here is to skip segments that are
empty to ensure that if the validation loop is skipped then no data
segments will be processed to create the image (and the module won't end
up having an image in the end).

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2022 at 16:03):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2022 at 16:04):

alexcrichton merged PR #4112.


Last updated: Dec 23 2024 at 12:05 UTC