Debian Patches

Status for rsync/3.4.1+ds1-8~exp1

Patch Description Author Forwarded Bugs Origin Last update
disable_reconfigure_req.diff Remove need to run reconfigure target

===================================================================
Samuel Henrique <samueloph@debian.org> not-needed 2024-04-12
skip_devices_test_non_linux.patch Skip "devices" test as it fails on kfreebsd and hurd
Error log:
sent 160 bytes received 117 bytes 554.00 bytes/sec
total size is 0 speedup is 0.00
check how the directory listings compare with diff:

+ + /<<PKGBUILDDIR>>/rsynctee -aii /<<PKGBUILDDIR>>/testtmp/devices/rsync.out --link-dest=/<<PKGBUILDDIR>>/testtmp/devices/to
/<<PKGBUILDDIR>>/testtmp/devices/from/ /<<PKGBUILDDIR>>/testtmp/devices/chk/
rsync: failed to hard-link /<<PKGBUILDDIR>>/testtmp/devices/to/fifo with fifo: Invalid cross-device link (1073741842)
cd ./
hD block
hD block2
hD block3
hD block3.5
hD char
hD char2
hD char3
cSc........ fifo
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
+ cat
+ diff -u /<<PKGBUILDDIR>>/testtmp/devices/rsync.chk /<<PKGBUILDDIR>>/testtmp/devices/rsync.out
/--- /<<PKGBUILDDIR>>/testtmp/devices/rsync.chk 2019-10-15 01:26:43.000000000 +0000
/+++ /<<PKGBUILDDIR>>/testtmp/devices/rsync.out 2019-10-15 01:26:43.000000000 +0000
@@ -6,4 +6,4 @@
hD char
hD char2
hD char3
-hS fifo
+cSc........ fifo
+ test_fail test 5 failed
+ echo test 5 failed
test 5 failed
+ exit 1
/bin/fakeauth: Error 1 for child 7541
/bin/settrans: Error 1 for child 7540
----- devices log ends
FAIL devices
Samuel Henrique <samueloph@debian.org> no 2024-04-12
env_shebang.patch =?utf-8?q?Removes_usage_of_env_on_shebangs_as_per_Debian_Policy_?= =?utf-8?q?=C2=A7_10=2E4?= Samuel Henrique <samueloph@debian.org> not-needed 2024-04-12
fix_rrsync_man_generation.patch Fix manpage installation for rrsync
Otherwise we would get "ERROR: support/rrsync.1 cannot be created."
I'm not confident this is the best approach on solving this issue,
but I know this works with no regressions.
This patch needs to be reviewed before being submitted to upstream.
===================================================================
Samuel Henrique <samueloph@debian.org> no 2024-04-12
fix-flaky-hardlinks-test.patch Fix flaky hardlinks test
The test was added in dc34990, it turns out that it's flaky. It failed
once on the Debian build infra, cf. [1].

The problem is that the command `rsync -aH '$fromdir/sym' '$todir'`
updates the mod time of `$todir`, so there might be a diff between the
output of `rsync_ls_lR $fromdir` and `rsync_ls_lR $todir`, if ever rsync
runs 1 second (or more) after the directories were created.

To clarify: it's easy to make the test fails 100% of the times with this
change:

```
makepath "$fromdir/sym" "$todir"
+sleep 5
checkit "$RSYNC -aH '$fromdir/sym' '$todir'" "$fromdir" "$todir"
```

With the fix proposed here, we don't use `checkit` anymore, instead we
just run the rsync command, then a simple `diff` to compare the two
directories. This is exactly what the other `-H` test just above does.

In case there's some doubts, `diff` fails if `sym` is missing:

```
$ mkdir -p foo/sym bar
$ diff foo bar || echo KO!
Only in foo: sym
KO!
```

I tested that, after this commit, the test still catches the `-H`
regression in rsync 3.4.0.


[1]: https://buildd.debian.org/status/fetch.php?pkg=rsync&arch=ppc64el&ver=3.4.1%2Bds1-1&stamp=1741147156&raw=0
Arnaud Rebillout <arnaudr@kali.org> yes 2025-03-06
reproducible-build.patch Make the build reproducible Chris Lamb <lamby@debian.org> yes 2025-01-16
gcc_15.patch bool is a keyword in C23 Michal Ruprich <mruprich@redhat.com> no 2025-01-17
CVE-2025-10158.patch fixed an invalid access to files array
this was found by Calum Hutton from Rapid7. It is a real bug, but
analysis shows it can't be leverged into an exploit. Worth fixing
though.

Many thanks to Calum and Rapid7 for finding and reporting this
Andrew Tridgell <andrew@tridgell.net> yes upstream upstream, https://github.com/RsyncProject/rsync/commit/797e17fc4a6f15e3b1756538a9f812b63942686f 2025-08-23
receiver_fix_basis_file_open_for_directory_symlinks.patch [PATCH 1/2] receiver: fix basis file open for directory symlinks (issue #715)

The secure_relative_open() change (c35e283) passes the full destination
path as relpath with basedir=NULL for FNAMECMP_FNAME, applying
O_NOFOLLOW to every component including intermediate directories. This
breaks legitimate directory symlinks on the receiver (e.g. -K), causing
"failed verification -- update discarded" on delta transfers when the
basis file can't be opened.

Fix by splitting file->dirname into basedir and file->basename into
fnamecmp for the FNAMECMP_FNAME case. secure_relative_open() already
follows symlinks in basedir, so directory symlinks are traversed while
O_NOFOLLOW still protects the final component. After reconstruction,
restore fnamecmp = fname to preserve pointer identity for downstream
checks (finish_transfer's backup handling, updating_basis_or_equiv,
directory-is-basis).

The split guard includes "fnamecmp == fname" because protocol < 29 may
set fnamecmp to partialptr without updating fnamecmp_type. Also clear
basedir in the daemon filter fallback and the protocol < 29 retry path
to prevent stale values from prior cases.

The CVE fix is preserved: FNAMECMP_FUZZY and basis_dir paths still use
secure_relative_open() with O_NOFOLLOW on all relpath components. For
FNAMECMP_FNAME, the generator and receiver write path already follow
directory symlinks in the same way, so no new information channel is
created. file->dirname is validated against ".." by clean_fname().
Samuel Henrique <samueloph@debian.org> no 2026-03-14

All known versions for source package 'rsync'

Links