You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Due to the path.Clean() call in the atPath() implementation, some paths that are rejected by other runtimes are OK in Wazero. For example, given a preopen directory fd and the path a/../a, path.Clean() would normalize away the .. and produce a as the final path. In runtimes such as Wasmtime and WAMR, since the first a/ does not exist, a call involving that path returns noent (44).
To Reproduce
This snippet will fail with Wasmtime, WAMR, WasmEdge, Wasmer. But Wazero creates the link a pointing to link successfully.
Additional context
The only other runtime that has the same behavior is Node with uvwasi. That's because uvwasi uses libuv which doesn't have an openat(2) equivalent (yet!).
The wasi-filesystem spec describes a path resolution implementation that conflicts with the usage of path.Clean and similar path normalization strategies.
The text was updated successfully, but these errors were encountered:
Describe the bug
Due to the
path.Clean()
call in theatPath()
implementation, some paths that are rejected by other runtimes are OK in Wazero. For example, given a preopen directory fd and the patha/../a
,path.Clean()
would normalize away the..
and producea
as the final path. In runtimes such as Wasmtime and WAMR, since the firsta/
does not exist, a call involving that path returnsnoent
(44).To Reproduce
This snippet will fail with Wasmtime, WAMR, WasmEdge, Wasmer. But Wazero creates the link
a
pointing tolink
successfully.Environment (please complete the relevant information):
Additional context
The only other runtime that has the same behavior is Node with uvwasi. That's because uvwasi uses libuv which doesn't have an
openat(2)
equivalent (yet!).The
wasi-filesystem
spec describes a path resolution implementation that conflicts with the usage ofpath.Clean
and similar path normalization strategies.The text was updated successfully, but these errors were encountered: