Stream: git-wasmtime

Topic: wasmtime / PR #1525 Wiggle: reject null (linear memory lo...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2020 at 18:47):

pchickey opened PR #1525 from pch/wiggle_null_ptr to master:

Linear memory location 0 is valid to access, but many toolchains we care about use it for null pointers. If a pointer to 0 is passed to wiggle, we should reject it with a new GuestError::NullPtr error, rather than permit a GuestPtr to dereference it.

One nice thing about this patch is that, if you don't apply the changes to the test crate, the proptests will quickly find that all test cases they generate using linear memory location 0 will fail. I added filters to the two memory location generator functions to ensure they don't produce location 0 anymore.

<!--

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 (Apr 16 2020 at 18:48):

pchickey requested alexcrichton for a review on PR #1525.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2020 at 18:54):

pchickey updated PR #1525 from pch/wiggle_null_ptr to master:

Linear memory location 0 is valid to access, but many toolchains we care about use it for null pointers. If a pointer to 0 is passed to wiggle, we should reject it with a new GuestError::NullPtr error, rather than permit a GuestPtr to dereference it.

One nice thing about this patch is that, if you don't apply the changes to the test crate, the proptests will quickly find that all test cases they generate using linear memory location 0 will fail. I added filters to the two memory location generator functions to ensure they don't produce location 0 anymore.

<!--

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 (Apr 16 2020 at 19:00):

pchickey updated PR #1525 from pch/wiggle_null_ptr to master:

Linear memory location 0 is valid to access, but many toolchains we care about use it for null pointers. If a pointer to 0 is passed to wiggle, we should reject it with a new GuestError::NullPtr error, rather than permit a GuestPtr to dereference it.

One nice thing about this patch is that, if you don't apply the changes to the test crate, the proptests will quickly find that all test cases they generate using linear memory location 0 will fail. I added filters to the two memory location generator functions to ensure they don't produce location 0 anymore.

<!--

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 (Apr 16 2020 at 20:05):

alexcrichton submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 21 2020 at 17:26):

pchickey closed without merge PR #1525.


Last updated: Nov 22 2024 at 17:03 UTC