Repository navigation
fix(fast_io): honour --insecure-links in the operator-path walk - #7459
Merged
Merged
Conversation
The ownership walk refused an untrusted symlink unconditionally, so
--insecure-links could not restore the legacy following it promises.
Four upstream 3.5.0 cells fail on that alone, all with the same text:
"CROSS-UID abs leaf insecure: --insecure-links did not restore symlink
following" - operator-path-{backup-dir,files-from,log-file,write-batch}.
Upstream asks the question inside the walk, not at its callers:
ona_open() opens with `if (symlink_optout_allowed()) return open(path,
flags, mode);` (syscall.c:300-302), which is why the answer reaches
open_no_attacker_symlinks() and owner_walk_parent() alike. The
short-circuit added here sits at the same place and covers this walk's
two entry points for the same reason.
Threading the flag instead would have touched ten call sites across
seven crates and every helper between them, and one un-threaded site
would have gone on confining under an opt-out the operator asked for.
The value is a property of the session, not of the call.
Activation::optout_allowed already spelled the rule out with a
twenty-row truth table and had no production caller. It is now the
thing that computes what the walk reads: install_session stores its
answer, and the two arm-specific constructors say which of upstream's
two disjoint arms the caller is so no site has to invent values for
fields its arm ignores. A daemon's arm needs a selected module, so the
daemon stays on the fully-confined default until that lands.
Note the opted-out branch spells out the empty-path convention:
owner_trusted_parent hands the walk an empty parent for a bare relative
leaf, which the walk resolves by starting at ".", and a plain open()
would report ENOENT.
The --insecure-links fix earns these four, so their rows move from fail to pass in the same change - an unexpected pass is a red leg, never a silent one. Generated from a full root pipe-leg run on Linux aarch64 at this commit, not hand typed. The emitted manifest differed from the committed one in exactly these four rows plus simd-checksum, which is skip on aarch64 and pass on the x86_64 runner - a property of the host, not of this change, so it is deliberately left alone. The nonroot leg is unchanged: all four cells self-skip without root (they need a symlink owned by a non-self uid), so they were already recorded pass there. The TCP legs never run them at all - --daemon-tests-only drops every cell that cannot reach the daemon transport.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…7477) The docs were last refreshed at #7423; 55 PRs have merged since, and the testsuite figures they quote had drifted far enough to understate the current state by roughly half. CHANGELOG: fill in Unreleased for everything merged since #7423. The dominant theme is routing every operator-named auxiliary file open onto the ownership walk - upstream's open_no_attacker_symlinks() applied at the call sites upstream applies it - plus a daemon hardening batch and an alt-dest correctness batch. README and SECURITY: the per-leg outcome tables were re-derived from the committed expect manifests rather than carried forward. Failures fell and the corpus grew, so every figure moved: non-root pipe 43 -> 21 fail (345 -> 349 corpus) root pipe 62 -> 29 fail (345 -> 349 corpus) non-root tcp 42 -> 29 fail (155 -> 158 corpus) root tcp 55 -> 38 fail (155 -> 158 corpus) Distinct divergences: 64 -> 31 across the two full-corpus legs, 89 -> 55 across all four. SECURITY, two CVE rows that had gone stale: - CVE-2026-53790 said "under audit". The refusal has since been applied at the live sink - oc-rsync's own single-character config expander, which upstream does not have, so an upstream-shaped port alone would have been inert (#7465, #7430, #7445). - CVE-2026-53795 listed only the staging family. The auxiliary-file family followed it onto the walk (#7421-#7426, #7439, #7441-#7443, #7459, #7463); what remains is the per-option-family confinement.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
* fix(fast_io): honour --insecure-links in the operator-path walk
The ownership walk refused an untrusted symlink unconditionally, so
--insecure-links could not restore the legacy following it promises.
Four upstream 3.5.0 cells fail on that alone, all with the same text:
"CROSS-UID abs leaf insecure: --insecure-links did not restore symlink
following" - operator-path-{backup-dir,files-from,log-file,write-batch}.
Upstream asks the question inside the walk, not at its callers:
ona_open() opens with `if (symlink_optout_allowed()) return open(path,
flags, mode);` (syscall.c:300-302), which is why the answer reaches
open_no_attacker_symlinks() and owner_walk_parent() alike. The
short-circuit added here sits at the same place and covers this walk's
two entry points for the same reason.
Threading the flag instead would have touched ten call sites across
seven crates and every helper between them, and one un-threaded site
would have gone on confining under an opt-out the operator asked for.
The value is a property of the session, not of the call.
Activation::optout_allowed already spelled the rule out with a
twenty-row truth table and had no production caller. It is now the
thing that computes what the walk reads: install_session stores its
answer, and the two arm-specific constructors say which of upstream's
two disjoint arms the caller is so no site has to invent values for
fields its arm ignores. A daemon's arm needs a selected module, so the
daemon stays on the fully-confined default until that lands.
Note the opted-out branch spells out the empty-path convention:
owner_trusted_parent hands the walk an empty parent for a bare relative
leaf, which the walk resolves by starting at ".", and a plain open()
would report ENOENT.
* test(ci): record the four opt-out cells passing on the root leg
The --insecure-links fix earns these four, so their rows move from fail
to pass in the same change - an unexpected pass is a red leg, never a
silent one.
Generated from a full root pipe-leg run on Linux aarch64 at this commit,
not hand typed. The emitted manifest differed from the committed one in
exactly these four rows plus simd-checksum, which is skip on aarch64 and
pass on the x86_64 runner - a property of the host, not of this change,
so it is deliberately left alone.
The nonroot leg is unchanged: all four cells self-skip without root (they
need a symlink owned by a non-self uid), so they were already recorded
pass there. The TCP legs never run them at all - --daemon-tests-only
drops every cell that cannot reach the daemon transport.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…7477) The docs were last refreshed at #7423; 55 PRs have merged since, and the testsuite figures they quote had drifted far enough to understate the current state by roughly half. CHANGELOG: fill in Unreleased for everything merged since #7423. The dominant theme is routing every operator-named auxiliary file open onto the ownership walk - upstream's open_no_attacker_symlinks() applied at the call sites upstream applies it - plus a daemon hardening batch and an alt-dest correctness batch. README and SECURITY: the per-leg outcome tables were re-derived from the committed expect manifests rather than carried forward. Failures fell and the corpus grew, so every figure moved: non-root pipe 43 -> 21 fail (345 -> 349 corpus) root pipe 62 -> 29 fail (345 -> 349 corpus) non-root tcp 42 -> 29 fail (155 -> 158 corpus) root tcp 55 -> 38 fail (155 -> 158 corpus) Distinct divergences: 64 -> 31 across the two full-corpus legs, 89 -> 55 across all four. SECURITY, two CVE rows that had gone stale: - CVE-2026-53790 said "under audit". The refusal has since been applied at the live sink - oc-rsync's own single-character config expander, which upstream does not have, so an upstream-shaped port alone would have been inert (#7465, #7430, #7445). - CVE-2026-53795 listed only the staging family. The auxiliary-file family followed it onto the walk (#7421-#7426, #7439, #7441-#7443, #7459, #7463); what remains is the per-option-family confinement.
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.
--insecure-linkspromises the pre-3.4.3 follow-any-symlink behaviour, but oc'soperator-path ownership walk refused an untrusted symlink unconditionally, so the
option could not restore anything. Four upstream 3.5.0 cells fail on that alone,
all with the same text:
operator-path-backup-dir,-files-from,-log-file,-write-batch.Where the fix goes
Upstream asks the question inside the walk, not at its callers -
ona_open()opens with
(
syscall.c:300-302), which is why the answer reaches bothopen_no_attacker_symlinks()andowner_walk_parent(). The short-circuit addedhere sits at the same place and covers this walk's two entry points for the same
reason.
Threading the flag instead would have touched ten call sites across seven crates
and every helper between them, and one un-threaded site would have gone on
confining under an opt-out the operator asked for. The value is a property of the
session, not of the call.
Activation::optout_allowedalready spelled the rule out with a twenty-row truthtable and had no production caller; it is now what computes the value the walk
reads. Two arm-specific constructors say which of upstream's two disjoint arms
the caller is, so no site invents values for fields its arm ignores. A daemon's
arm needs a selected module, so the daemon stays on the fully-confined default
until that lands.
Verification
Measured on Linux aarch64, root, against the 3.5.0 suite.
operator-path-insecure-links-refused(confinement still enforced)operator-path-insecure-links-daemon(daemon arm untouched)operator-path-backup-rmdir,-backup-symlinkMutation: forcing
session_optout_allowed()tofalseturns all four back toFAIL while
insecure-links-refusedstays green - so they are not passing for anunrelated reason, and the control does not depend on the opt-out.
The other operator-path failures are untouched and report identical text -
-link-dest/-compare-dest/-copy-dest/-temp-dir/-inplace-backup-dirstillsay the symlink was followed (a separate defect: the walk is not reached at
all), and
-partial-dirstill over-refuses the operator's own euid-owned link.Neither class is in scope here.
Manifest rows were generated from a full root-leg run, not hand typed; the only
other difference was
simd-checksum, which isskipon aarch64 andpasson thex86_64 runner, so it is deliberately left alone.