./net/rsync, Network file distribution/synchronisation utility

[ Image CVSweb ] [ Image Homepage ] [ Image RSS ] [ Image Required by ]


Branch: CURRENT, Version: 3.5.2nb1, Package name: rsync-3.5.2nb1, Maintainer: pkgsrc-users

rsync is a replacement for rcp that has many more features.

rsync uses the "rsync algorithm" which provides a very fast method for
bringing remote files into sync. It does this by sending just the
differences in the files across the link, without requiring that both
sets of files are present at one of the ends of the link beforehand.
This makes rsync a good remote file distribution/synchronisation utility
in a dialup PPP/SLIP environment.

Note: it requires rsync on the destination machine.

There is a Computer Science Technical Report on the rsync algorithm
included in the distribution, and is also available as
ftp://samba.anu.edu.au/pub/rsync/tech_report.ps


Required to run:
[shells/bash] [security/openssl] [devel/popt] [archivers/lz4] [archivers/zstd] [devel/xxhash]

Required to build:
[pkgtools/cwrappers]

Package options: acl, zstd

Master sites:

Filesize: 1931.527 KB

Version history: (Expand)


CVS history: (Expand)


   2026-11-06 12:52:40 by Thomas Klausner | Files touched by this commit (4) | Package updated
Log message:
rsync: update to 3.5.2nb1.

add upstream patch fixing a problem with receiving symlinks.

Bump PKGREVISION.

Add test status.
   2026-11-04 17:56:24 by Thomas Klausner | Files touched by this commit (2) | Package updated
Log message:
rsync: update to 3.5.2.

# NEWS for rsync 3.5.2 (4 Nov 2026)

## Changes in this version:

### BUG FIXES:
- Fixed interrupted `--append` and `--inplace` transfers writing the final
  256 KiB buffer twice. An interrupted destination now remains a clean prefix
  which the next transfer can resume or repair.
- Fixed uploads through `rrsync` when the destination file already exists.
  Existing files are now reached beneath a pinned parent directory instead of
  being passed as an unwritable `/proc/self/fd/N` destination.
- Fixed poor matching performance on large sparse and repeated-block files
  when duplicate checksum chains exhausted the search limit. Valid basis
  blocks are no longer hidden behind duplicate entries.
- Bounded strong-checksum work when a malicious receiver supplies weak
  checksums that collide with consecutive rolling windows
  (CVE-2026-119741).
- Prevented the `--inplace` matcher from advancing its aligned basis index
  beyond the available checksum entries. This avoids signed overflow on large
  source files when the peer supplies a small block count.
- Recovered from failed hard-link creation without aborting or hanging the
  generator. Remaining members fall back to a fresh hard-link group when the
  original destination inode cannot accept another link.
- Prevented an out-of-bounds write while invalidating a sender checksum after
  a file read error when the negotiated checksum length is zero.
- Fixed a daemon receiver stack overflow when queued deletion output reached
  `--max-alloc`. Quiet daemon transfers no longer queue deletion messages
  unless the client requested them.
- Fixed a `--files-from` pull from a subdirectory of a daemon module, which
  read each listed file from the module root instead.  It could send, and with
  `--remove-source-files` delete, a same-named file the module's filter
  excludes.
- Fixed password files whose first line is empty. The parser no longer skips
  the empty line and uses a later password.
- Escaped terminal control characters in filenames and diagnostics written to
  standard output, standard error and log files while preserving printable
  text in the active locale.
- Preserved Cygwin and MSYS2 UNC roots during ownership-checked path walks.
- Restored daemon startup from accepted named Unix sockets on standard input,
  including filesystem and Linux abstract sockets used for socket activation.
  Unnamed local socket pairs remain non-daemon channels.
- Fixed forward-DNS hostname entries in daemon `hosts allow` and `hosts deny`
  lists for IPv6 peers. Address comparison is now binary and family-aware.
- Preserved Unix symlink permissions on systems which require `fchmodat()` to
  change the mode of a symlink rather than its target.
- Restored builds on systems without `O_CLOEXEC` or `O_DIRECTORY`, including
  Solaris 10.

### ENHANCEMENTS:
- Added `--nice` to adjust CPU and I/O scheduling priorities for local and
  remote rsync processes. Daemon clients and rrsync cannot raise server-side
  priorities.
- Human-readable output now uses dynamic precision to show three significant
  digits and appends `i` to binary unit suffixes. `--progress` uses the same
  formatter for transfer rates and labels byte counts and rates with `B` and
  `B/s`. Example output includes `46.7M`, `48.8Mi`, `782,448B` and
  `113,295B/s`. File-list, created-directory and skipped-deletion counts also
  use thousands separators.
- Added `--delay-symlinks` to defer creating new and changed symlinks until
  other transferred files are in place. It implies `--no-inc-recursive` and
  requires protocol 29 or newer with support on the receiving side. It cannot
  be combined with `--remove-source-files`, `--hard-links`, `--compare-dest`,
  `--copy-dest` or `--link-dest`.
   2026-09-23 00:59:31 by Kimmo Suominen | Files touched by this commit (1) | Package updated
Log message:
rsync: Add DISTINFO_FILE and PATCHDIR to Makefile.common

Try to avoid net/rrsync/distinfo going stale on rsync updates.
   2026-09-22 08:44:46 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
rsync: updated to 3.5.1

3.5.1

PROTOCOL NUMBER:

The protocol number was changed to 33.

BUG FIXES:

Fixed several path-handling regressions from 3.5.0. Explicit sender paths can \ 
again traverse symlinked ancestors without weakening confinement of paths found \ 
during recursive scans. Local and remote-shell --files-from paths are handled as \ 
operator-supplied paths rather than paths beneath the transfer root.
Fixed access to /dev/stdin, /dev/stdout, /dev/stderr and /dev/fd/N when they \ 
refer to pipes or descriptors inside user namespaces. Reading batch data from a \ 
FIFO or process substitution works again.
Restored --max-alloc=0 as a spelling for the parser's maximum allocation \ 
limit rather than disabling that limit.
Fixed restricted-root paths in rrsync and detection of an inetd connection when \ 
a daemon is started with a local socket on standard input, as can happen under \ 
ADB without a PTY.
Allowed --contimeout for daemon connections made through --rsh without applying \ 
it to ordinary remote-shell transfers.
Tightened validation of partial-directory state and alternate-destination paths \ 
on the receiver. An alternate-destination leaf symlink is no longer followed as \ 
a basis file.
Fixed undefined shifts in the bundled zlib code and a FreeBSD amd64 build \ 
failure involving the assembly and SIMD objects.

ENHANCEMENTS:

Added support for internationalised domain names when the required library is \ 
available at build time.
Added the number of 4 KiB logical blocks touched to --stats. This counts \ 
distinct logical file regions written by the receiver, not physical disk blocks \ 
or disk I/O. It is reported when both peers negotiate protocol 33.

BUILD AND TESTS:

install-strip now honours STRIP including during cross-compilation.
Updated platform tests and fleet-test coverage for the 3.5.0 fixes.
   2026-08-15 08:57:51 by Thomas Klausner | Files touched by this commit (3)
Log message:
rsync, rrsync: put some shared values into Makefile.common
   2026-08-13 08:17:23 by Thomas Klausner | Files touched by this commit (2) | Package updated
Log message:
rsync: update to 3.5.0.

This release fixes 33 security issues found during a focused audit
of rsync's path handling and daemon protocol, a companion
daemon-protocol fuzzing pass, and reports from external researchers
-⁠-⁠ plus several robustness hardenings. CVE IDs were assigned by
VulnCheck (CNA); the precise "introduced in" version ranges accompany
each advisory, and many are much narrower than "everything before
3.5.0". Every fix ships with a regression test in the test suite
that fails on the unfixed tree.

Full details at https://download.samba.org/pub/rsync/NEWS#3.5.0
   2026-06-08 07:45:28 by Thomas Klausner | Files touched by this commit (3) | Package updated
Log message:
rsync: update to 3.4.4.

# NEWS for rsync 3.4.4 (8 Jun 2026)

## Changes in this version:

This is a conservative point release that backports regression fixes
on top of 3.4.3.  No new features are included.

### BUG FIXES:

- Honour a relative alt-basis directory (e.g. `--link-dest=../sibling`,
  `--copy-dest`, `--compare-dest`) on a daemon receiver running with
  `use chroot = no`.  Such a path is re-anchored at the module root but
  was then rejected by the receiver's secure open; it now works where
  kernel-enforced confinement is available.  See the PORTABILITY note
  below for the platform limitation.  Fixes #915.

- sender: open a module-root-absolute path for a `path = /` module so a
  daemon serving the filesystem root can satisfy absolute request
  paths again.  Fixes #897.

- flist: accept the missing-args mode-0 entry in recv_file_entry.
  Fixes #910.

- receiver: fix a false "failed verification -- update discarded" when
  resuming a delta transfer with an absolute `--partial-dir`.

- receiver: fix a NULL dereference on the delta discard path.

- generator: cap the block s2length at the negotiated checksum length.

- main: fix `--mkpath` with `--dry-run` for a file-to-file copy.
  Fixes #880.

- daemon: un-backslash escaped option args.  Fixes #829.

- token: drain the matched-block insert deflate.  Fixes #951.

- Fix the "update skips a file of a different type" case and the
  daemon upload delete stats.

- alloc: revert "zero all new memory from allocations".  Fixes #959.

- Always clear the stat buffer and validate nanoseconds before use.

### PORTABILITY / BUILD:

- The relative alt-basis fix for daemon receivers (#915) relies on
  kernel "stay below dirfd" path resolution -- `openat2(RESOLVE_BENEATH)`
  on Linux 5.6+, or `openat()` with `O_RESOLVE_BENEATH` on FreeBSD 13+
  and macOS 15+.  On platforms that lack it (Solaris, OpenBSD, NetBSD,
  Cygwin and older Linux) `secure_relative_open()` deliberately rejects
  any path with a `..` component, so relative alt-basis directories
  remain unavailable there -- function traded for safety, matching the
  trade-off already documented for the #715 fix.  Absolute alt-basis
  paths are unaffected on every platform.

- openat2 is now autodetected at configure time (HAVE_OPENAT2): the
  `openat2(RESOLVE_BENEATH)` resolver is compiled in only when both
  `<linux/openat2.h>` and the `SYS_openat2` syscall number are present,
  fixing the build on older kernels/headers.  Fixes #924, #905, #900,
  #904.

- Fall back to do_mknod() when mknodat() / mkfifoat() are unavailable.
  Fixes #896.

- Install generated manpages correctly in an out-of-tree build.
   2026-05-21 11:13:07 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
rsync: updated to 3.4.3

rsync 3.4.3 (20 May 2026)

Changes in this version:

SECURITY FIXES:

Six CVEs are fixed in this release.  All six are assigned by
VulnCheck as CNA.  Affected versions are 3.4.2 and earlier in every
case.  Three of the six (CVE-2026-29518, CVE-2026-43617,
CVE-2026-43619) require non-default daemon configuration to reach:
the first and third need `use chroot = no` for a module, the second
needs `daemon chroot = ...` set in rsyncd.conf.  Two (CVE-2026-43618,
CVE-2026-43620) are reachable from a normal pull or a normal
authenticated daemon connection.  The sixth (CVE-2026-45232) is
reachable only when `RSYNC_PROXY` is set and the proxy (or a MITM)
returns a pathological response.  Many thanks to the external
researchers who reported these issues.

- CVE-2026-29518 (CVSS v4.0 7.3, HIGH): TOCTOU symlink race condition
  allowing local privilege escalation in daemon mode without chroot.
  An rsync daemon configured with "use chroot = no" was exposed to a
  time-of-check / time-of-use race on parent path components: a local
  attacker with write access to a module could replace a parent
  directory component with a symlink between the receiver's check and
  its open(), redirecting reads (basis-file disclosure) and writes
  (file overwrite) outside the module.  Default "use chroot = yes" is
  not exposed.  `secure_relative_open()` (added in 3.4.0 for
  CVE-2024-12086) was previously unused in the daemon-no-chroot
  case; the fix enables it there and reroutes the sender's
  read-path opens through it.  Reported by Nullx3D (Batuhan Sancak),
  Damien Neil and Michael Stapelberg.

- CVE-2026-43617 (CVSS v3.1 4.8, MEDIUM): Hostname/ACL bypass on an
  rsync daemon configured with `daemon chroot = /X` in rsyncd.conf
  when the chroot tree lacks DNS resolution support.  The
  reverse-DNS lookup of the connecting client was performed *after*
  the daemon chroot had been entered; if /X did not contain the
  libc resolver fixtures (`/etc/resolv.conf`, `/etc/nsswitch.conf`,
  `/etc/hosts`, NSS service modules) the lookup failed and the
  connecting hostname was set to "UNKNOWN", causing hostname-based
  deny rules to silently fail open.  IP-based ACLs are unaffected.
  The per-module `use chroot` setting is unrelated to this issue.
  The fix performs the lookup before entering the daemon chroot.
  Reported by MegaManSec.

- CVE-2026-43618 (CVSS v3.1 8.1, HIGH): Integer overflow in the
  compressed-token decoder enabling remote memory disclosure to an
  authenticated daemon peer.  The receiver accumulated a 32-bit
  signed counter without overflow checking; a malicious sender could
  trigger an overflow that, with careful manipulation, leaked process
  memory contents to the attacker -- environment variables,
  passwords, heap and library pointers -- significantly weakening
  ASLR.  The fix bounds the counter and adds wire-input validation in
  several adjacent places (defence-in-depth).  Workaround for older
  releases: `refuse options = compress` in rsyncd.conf.  Reported by
  Omar Elsayed.

- CVE-2026-43619 (CVSS v3.1 6.3, MEDIUM): Symlink races on path-based
  system calls in "use chroot = no" daemon mode (generalisation of
  CVE-2026-29518).  Earlier fixes for symlink races on the receiver's
  open() call missed the same race class on every other path-based
  system call: chmod, lchown, utimes, rename, unlink, mkdir, symlink,
  mknod, link, rmdir and lstat.  The fix routes each affected
  path-based syscall through a parent dirfd opened under
  RESOLVE_BENEATH-equivalent kernel-enforced confinement (openat2 on
  Linux 5.6+, O_RESOLVE_BENEATH on FreeBSD 13+ and macOS 15+,
  per-component O_NOFOLLOW walk elsewhere).  Default "use chroot =
  yes" is not exposed.  Reported by Andrew Tridgell as a follow-on
  audit of CVE-2026-29518.

- CVE-2026-43620 (CVSS v3.1 6.5, MEDIUM): Out-of-bounds read in the
  receiver's recv_files() enabling remote denial-of-service of any
  client pulling from a malicious server (incomplete fix of commit
  797e17f).  The earlier parent_ndx<0 guard added to send_files() was
  not applied to the visually-identical block in recv_files().  A
  malicious rsync server can drive any connecting client into a
  deterministic SIGSEGV by setting CF_INC_RECURSE in the
  compatibility flags and sending a crafted file list and transfer
  record.  inc_recurse is the protocol-30+ default, so no special
  options are required on the victim.  Workaround for older
  releases: `--no-inc-recursive` on the client.  Reported by Pratham
  Gupta.

- CVE-2026-45232 (CVSS v3.1 3.1, LOW): Off-by-one out-of-bounds stack
  write in the rsync client's HTTP CONNECT proxy handler
  (`establish_proxy_connection()` in `socket.c`).  After issuing the
  CONNECT request, rsync read the proxy's first response line one
  byte at a time into a 1024-byte stack buffer with the bound
  `cp < &buffer[sizeof buffer - 1]`.  If the proxy (or a MITM in
  front of it) returned 1023+ bytes on that first line without a
  newline terminator, `cp` exited the loop pointing at a buffer slot
  the loop never wrote, leaving `*cp` holding stale stack data from
  the earlier `snprintf()` of the outgoing CONNECT request.  The
  post-loop logic then wrote a single `\0` one byte past the end of
  the buffer on the stack.  Reach is client-side only, and only when
  `RSYNC_PROXY` is set so rsync tunnels an `rsync://` connection
  through an HTTP CONNECT proxy.  The written byte is always `\0`
  and the offset is fixed by the buffer size, not attacker-chosen,
  so this is not an arbitrary-write primitive: practical impact is
  corruption of one adjacent stack byte and possible later
  misbehaviour or crash.  The fix detects the "buffer filled without
  finding `\n`" case explicitly by position and refuses the response
  with "proxy response line too long".  Reported by Aisle Research
  via Michal Ruprich (rsync-3.4.1-2.el10 QE).

In addition to the six CVE fixes, this release adds defence-in-depth
hardening on several adjacent paths: bounded wire-supplied counts and
lengths in flist/io/acls/xattrs, a guard against length underflow in
cumulative `snprintf()` callers, a parent block-index bounds check on
the receiver, a NULL check in `read_delay_line()`, a lower ceiling on
`MAX_WIRE_DEL_STAT` to avoid signed-int overflow in the
`read_del_stats()` accumulator, rejection of hyphen-prefixed
remote-shell hostnames (defence-in-depth against argv-injection in
tooling that forwards untrusted input into the hostspec position;
reported by Aisle Research via Michal Ruprich), and a NULL-check on
`localtime_r()` in `timestring()` to keep a malicious server from
crashing the client by advertising a file with an out-of-range
modtime.

BUG FIXES:

- Fixed a regression introduced by the 3.4.0 secure_relative_open()
  CVE fix where legitimate directory symlinks on the receiver side
  (e.g. when using `-K` / `--copy-dirlinks`) caused "failed
  verification -- update discarded" errors on delta transfers. The
  old code rejected every symlink in the path with a per-component
  `O_NOFOLLOW` walk; the receiver now uses kernel-enforced "stay
  below dirfd" path resolution where available.

PORTABILITY / BUILD:

- secure_relative_open() now uses `openat2(RESOLVE_BENEATH |
  RESOLVE_NO_MAGICLINKS)` on Linux 5.6+, and `openat()` with
  `O_RESOLVE_BENEATH` on FreeBSD 13+ and macOS 15+ (Sequoia) /
  iOS 18+. The kernel rejects ".." escapes, absolute symlinks, and
  symlinks whose target lies outside the starting directory, while
  still following symlinks that resolve within it -- the same
  trade-off that fixes the issue 715 regression without weakening
  the original CVE protection. Other platforms (Solaris, OpenBSD,
  NetBSD, Cygwin) retain the previous per-component `O_NOFOLLOW`
  walk; on those platforms the issue 715 regression remains
  visible.

- testsuite/xattrs: ignore `SUNWattr_*` in the Solaris `xls`
  helper.