Repository navigation
fix: refuse an untrusted destination symlink with the upstream diagnostic - #8071
Merged
Merged
Conversation
oferchen
force-pushed
the
fix/search-only-traversal
branch
from
September 30, 2026 14:01
de929d3 to
c5608c3
Compare
oferchen
force-pushed
the
fix/untrusted-dest-symlink-diagnostic
branch
from
September 30, 2026 14:02
0405cdf to
c73ef32
Compare
oferchen
force-pushed
the
fix/untrusted-dest-symlink-diagnostic
branch
2 times, most recently
from
October 1, 2026 04:26
0795cb6 to
3c8919e
Compare
…stic rsync 3.5.1 resolves an existing destination directory through the ownership walk before the receiver writes anything (change_dir()), and the walk prints the actionable "refusing to follow a symlink owned by an untrusted user; use --insecure-links ..." line whenever it refuses a symlink owned by neither root nor the euid. oc followed the destination by path and failed later with "cannot replace non-directory destination with directory" (exit 23). Resolve an existing destination directory the same way (exit 3, RERR_FILESELECT) and emit the upstream diagnostic from the walk on the error channel. --insecure-links keeps the plain follow.
The destination walk opens the root O_PATH on Linux and O_RDONLY elsewhere, exactly like upstream directory_traverse_flags(). A 0333 destination therefore transfers on Linux but fails file selection with exit 3 on macOS - measured identical against upstream 3.5.1 on macOS (change_dir#1 ... Permission denied, code 3). Gate the transfer cell to Linux and pin the non-Linux exit 3 in a companion.
oferchen
force-pushed
the
fix/untrusted-dest-symlink-diagnostic
branch
2 times, most recently
from
October 1, 2026 17:50
90b913d to
b2549a0
Compare
This was referenced Oct 6, 2026
This was referenced Oct 14, 2026
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.
Summary
Part 2 of 3 of the 3.5.1 confinement remainder, stacked on the search-only traversal PR.
rsync 3.5.1 resolves an existing destination directory through the ownership walk (
change_dir()) before the receiver writes anything. When the walk refuses a symlink owned by neither root nor the euid, it prints the actionable "refusing to follow a symlink owned by an untrusted user; use --insecure-links ..." line.oc followed the destination by path and failed later with "cannot replace non-directory destination with directory" (exit 23).
oc now resolves an existing destination directory the same way:
--insecure-linkskeeps the plain follow.