Skip to content

docs(windows): audit path normalization for backslash leakage (#1905) - #3511

Merged
oferchen merged 2 commits into
masterfrom
feat/windows-path-audit-1905
May 1, 2026
Merged

oferchen merged 2 commits into
masterfrom
feat/windows-path-audit-1905

Conversation

@oferchen

@oferchen oferchen commented May 1, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces docs/audits/windows-path.md with a comprehensive audit for issue #1905 ("verify no backslash leak"). The previous file documented only F1 (wire emission of \); this revision broadens the survey across crates/protocol/, crates/transfer/, crates/filters/, crates/core/, and crates/cli/ and adds a new HIGH-severity finding (F2: filter-rule matching against \-containing paths).

Findings:

  • F1 (HIGH, reproduced) - name_bytes() and write_symlink_target() emit native \ to the wire when the sender is Windows.
  • F2 (HIGH, new) - FilterChain::allows and allows_deletion match against \-containing PathBuf values on Windows generators; globset patterns are /-only, so rules silently fail to apply to nested paths.
  • F3 (LOW, latent) - is_unsafe_symlink walks targets treating only / as a separator; dormant until Windows symlink support lands.
  • F4 (INFO) - sanitize_path and clean_and_validate_name are intentionally /-only, matching upstream.
  • F5 (NO LEAK) - daemon module path resolution is server-side and never wire-bound.

A single shared helper (to_wire_path_bytes) applied at four call sites would close F1 and F2 simultaneously; the proposed locations are listed in the audit.

Guarantees

  • Docs-only: no code, configuration, or other docs were modified; only docs/audits/windows-path.md is touched.
  • Cites real symbols: every site reference uses path:line against the actual codebase (verified via Grep / Read), and upstream cites refer to target/interop/upstream-src/rsync-3.4.1/.
  • Matches existing audit style: headings, tone, and citation pattern follow docs/audits/iouring-pipe-stdio.md, docs/audits/mmap-iouring-co-usage.md, and docs/audits/windows-path-normalization.md.
  • Conventional prefix and hyphens: PR title uses docs(windows):, prose uses hyphens (no em-dashes).

Test plan

  • Confirm the doc renders cleanly on GitHub
  • Verify all referenced symbols still exist in the cited line ranges
  • No code changes; CI should be green on docs-only diff

@oferchen
oferchen merged commit c57661f into master May 1, 2026
10 checks passed
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 1, 2026
@oferchen
oferchen deleted the feat/windows-path-audit-1905 branch May 1, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant