-
Notifications
You must be signed in to change notification settings - Fork 35
wasi:filesystem@0.3.0-rc-2025-09-16: Add tests for symbolic links #139
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
base: main
Are you sure you want to change the base?
Conversation
667abf4 to
b3e1496
Compare
b3e1496 to
8285239
Compare
|
Would it make sense to add this test case? WASIT found this sandbox escape in WAMR. In short, this tests that backslashes are properly handled in symlinks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed this should add coverage of cases for previously found sandbox escapes.
|
|
||
| assert_eq!(ln_s("whatever", "").await, Err(ErrorCode::NoEntry)); | ||
| assert_eq!(ln_s("", "whatever").await, Err(ErrorCode::NoEntry)); | ||
| // symlink-at: async func(old-path: string, new-path: string) -> result<_, error-code>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this belong up at line 68?
8285239 to
8771068
Compare
8771068 to
869e215
Compare
| ErrorCode::Loop | ||
| ); | ||
|
|
||
| ln_s("parent", "parent-link").await.unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows Wasmtime failure:
Test filesystem-symbolic-links failed
[exit_code] 0 == 3
STDOUT:
STDERR:
thread '' (1) panicked at src/bin/filesystem-symbolic-links.rs:69:41:
called Result::unwrap() on an Err value: ErrorCode { code: 30, name: "not-permitted", message: "Operation not permitted, similar to EPERM in POSIX." }
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Error: failed to run main module tests\rust\testsuite\wasm32-wasip3\filesystem-symbolic-links.wasm
| rm("self").await.unwrap(); | ||
|
|
||
| assert_eq!(ln_s("whatever", "").await, Err(ErrorCode::NoEntry)); | ||
| assert_eq!(ln_s("", "whatever").await, Err(ErrorCode::NoEntry)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasmtime MacOS failure:
Test filesystem-symbolic-links failed
[exit_code] 0 == 134
STDOUT:
STDERR:
thread '' (1) panicked at src/bin/filesystem-symbolic-links.rs:92:5:
assertion left == right failed
left: Ok(())
right: Err(ErrorCode { code: 19, name: "no-entry", message: "No such file or directory, similar to ENOENT in POSIX." })
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Error: failed to run main module tests/rust/testsuite/wasm32-wasip3/filesystem-symbolic-links.wasm
No description provided.