Skip to content

fix(linux): refuse nested mount deletion - #5

Merged
rteoo merged 3 commits into
mainfrom
fix/linux-nested-mounts
Sep 25, 2026
Merged

rteoo merged 3 commits into
mainfrom
fix/linux-nested-mounts

Conversation

@rteoo

@rteoo rteoo commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Block Linux directory targets containing nested mounts before deletion, including same-device bind mounts.
  • Walk permanent deletions through directory descriptors and compare mount IDs before entering children.
  • Add a privileged bind-mount regression to Linux CI.

Testing

  • Linux CI: cargo xtask lint and cargo xtask test passed; the privileged bind-mount regression ran and passed (1 test).
  • macOS and Windows CI: lint, tests, release build, and binary smoke test passed.
  • Local git diff --check passed. Cargo is unavailable on this Windows host, so local Rust checks could not run.

Risks

  • Linux permanent deletion requires kernel mount IDs from statx; unsupported kernels fail closed.
  • Concurrent same-volume renames can still replace a marked name during deletion.

Related: tobi#9 and tobi#10.

Block marked directories containing mounts before removal and traverse permanent deletions through directory descriptors with mount-ID checks. Exercise a same-device bind mount in Linux CI.
@rteoo
rteoo marked this pull request as ready for review September 25, 2026 14:49
@rteoo
rteoo merged commit 474d59c into main Sep 25, 2026
3 checks passed
@rteoo
rteoo deleted the fix/linux-nested-mounts branch September 25, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant