fix(fs): reject backend symlink reads - #2279
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | e965586 | Commit Preview URL | Aug 07 2026, 04:59 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
FsBackendfrom following symlinks and leaking host files when wrapped byPosixFs(TM-ESC/TM-FS class issue).Description
PosixFs::read_filenow rejects entries whosestat()reportssymlinkand returnsNotFoundinstead of delegating toFsBackend::read, preventing a symlink-following backend from escaping the VFS.test_posix_read_does_not_delegate_symlink_to_backendthat creates a symlink via the backend and assertsread_filefails and the raw backend'sreadis never invoked.knowledge/security/threat-model.mdandcrates/bashkit/docs/threat-model.md).crates/bashkit/src/fs/posix.rstests.Testing
cargo test -p bashkit fs::posix::tests::test_posix_read_does_not_delegate_symlink_to_backend -- --exactand it passed.cargo test -p bashkit fs::posix::testsand the suite passed.cargo clippy -p bashkit --lib -- -D warnings,cargo fmt --check, andjust check-okf; all completed successfully.Codex Task