Skip to content

docs(iconv): audit transcoding pipeline completeness - #3424

Merged
oferchen merged 1 commit into
masterfrom
docs/iconv-pipeline-audit
Apr 29, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/iconv-pipeline-audit

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

Tracks task #1840.

Maps every iconvbufs(ic_send, ...) / iconvbufs(ic_recv, ...) site in
upstream rsync 3.4.1 to its oc-rsync counterpart and reports gaps. New
document lives at docs/audits/iconv-pipeline.md.

Findings

Sev Finding Upstream oc-rsync
Critical IconvSetting is never bridged to FilenameConverter; --iconv is inert end to end compat.c:setup_iconv + every iconvbufs call core::client::config::iconv parses but never feeds transfer::ServerConfigBuilder::iconv
High Receiver symlink target not transcoded flist.c:1127-1150 crates/protocol/src/flist/read/extras.rs::read_symlink_target
High Sender symlink target not transcoded flist.c:1606-1621 crates/protocol/src/flist/write/encoding.rs::write_symlink_target
High --files-from forwarding not transcoded io.c:417-452 (sender) + io.c:1276-1287 (receiver) crates/protocol/src/files_from.rs
High --secluded-args/--protect-args not transcoded rsync.c:283-320 (send) + io.c:1300-1303 (recv) crates/protocol/src/secluded_args.rs
Medium 's' (CF_SYMLINK_ICONV) advertised unconditionally compat.c:716-718, 763-767 crates/transfer/src/setup/capability.rs::CAPABILITY_MAPPINGS
Low Log lines not transcoded log.c:251-371 crates/logging
Info xattr names: no transcoding upstream, no transcoding here xattrs.c crates/protocol/src/xattr/*

Why audit only, no fix in this PR

The five high/critical gaps are interlocked: fixing the symlink and
files-from sites without bridging IconvSetting -> FilenameConverter (Finding 4)
changes nothing observable, and bridging the converter without the
symlink/files-from hooks leaves real path categories broken. A correct
landing also needs new sender_symlink_iconv plumbing through the flist
reader/writer, plus golden wire round-trip tests for non-ASCII paths and
non-ASCII symlink targets. That is more than the 'small isolated fix'
scope this task allows, so the audit document ships standalone and lists
explicit follow-ups.

Follow-ups (to be filed after this lands)

  • Implement sender_symlink_iconv and apply iconv to symlink targets
    in both directions (Findings 1 + 2).
  • Add iconv hooks to --files-from forwarding and --secluded-args
    send/recv (Findings 3a, 3b).
  • Add IconvSetting -> FilenameConverter bridge and call
    ServerConfigBuilder::iconv(...) from
    crates/cli/src/frontend/execution/drive/config.rs (Finding 4).
  • Gate 's' capability emission on iconv_opt.is_some() (Finding 5).
  • Optional: log-line transcoding (Finding 6).

Test plan

  • Document compiles via repo Markdown rendering (no front-matter or fenced
    code linting required by CI).
  • No code changes, no new dependencies, no fmt/clippy/nextest required.
  • Reviewer confirms upstream line references and oc-rsync paths.

Maps every upstream rsync 3.4.1 iconv call site (in flist.c, io.c, rsync.c,
log.c, compat.c) to its oc-rsync counterpart and flags the gaps. Findings:

- Critical: --iconv is end-to-end inert because no production code converts
  IconvSetting into a FilenameConverter or calls
  ServerConfigBuilder::iconv(...).
- High: receiver and sender symlink targets bypass iconv (flist read/write
  extras).
- High: --files-from forwarding and --secluded-args/--protect-args bypass
  iconv on both sides.
- Medium: capability string unconditionally advertises 's' (CF_SYMLINK_ICONV)
  regardless of iconv configuration.
- Low: log lines are not transcoded.

The set is interlocked, so this PR ships the audit document only and links
follow-ups for each finding rather than making a partial change.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Apr 29, 2026
@oferchen
oferchen merged commit 488d893 into master Apr 29, 2026
12 checks passed
@oferchen
oferchen deleted the docs/iconv-pipeline-audit branch April 29, 2026 10:21
oferchen added a commit that referenced this pull request May 1, 2026
…3424)

Maps every upstream rsync 3.4.1 iconv call site (in flist.c, io.c, rsync.c,
log.c, compat.c) to its oc-rsync counterpart and flags the gaps. Findings:

- Critical: --iconv is end-to-end inert because no production code converts
  IconvSetting into a FilenameConverter or calls
  ServerConfigBuilder::iconv(...).
- High: receiver and sender symlink targets bypass iconv (flist read/write
  extras).
- High: --files-from forwarding and --secluded-args/--protect-args bypass
  iconv on both sides.
- Medium: capability string unconditionally advertises 's' (CF_SYMLINK_ICONV)
  regardless of iconv configuration.
- Low: log lines are not transcoded.

The set is interlocked, so this PR ships the audit document only and links
follow-ups for each finding rather than making a partial change.
oferchen added a commit that referenced this pull request May 5, 2026
…3424)

Maps every upstream rsync 3.4.1 iconv call site (in flist.c, io.c, rsync.c,
log.c, compat.c) to its oc-rsync counterpart and flags the gaps. Findings:

- Critical: --iconv is end-to-end inert because no production code converts
  IconvSetting into a FilenameConverter or calls
  ServerConfigBuilder::iconv(...).
- High: receiver and sender symlink targets bypass iconv (flist read/write
  extras).
- High: --files-from forwarding and --secluded-args/--protect-args bypass
  iconv on both sides.
- Medium: capability string unconditionally advertises 's' (CF_SYMLINK_ICONV)
  regardless of iconv configuration.
- Low: log lines are not transcoded.

The set is interlocked, so this PR ships the audit document only and links
follow-ups for each finding rather than making a partial change.
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