[ Reason ]
CVE-2026-119741: a receiver can send block checksums whose weak
checksum collides with the sender's rolling checksum at consecutive
offsets, while the strong checksum never matches. The sender then
calculates a full strong checksum at every byte offset.
Unauthenticated clients pulling from a public daemon module can use
this to exhaust the daemon's CPU across concurrent connections.
The same upstream commit also fixes #1149604 (upstream GH #1115), a
regression that 3.5.0+ds1-0+deb13u1 (DSA-6527-1) brought to trixie.
3.5.0 caps the hash_search() chain walk at 1024 candidates with the
same weak checksum (MAX_CHAIN_LEN). When more than 1024 identical
non-matching blocks come before the matching ones in a chain, the
walk stops before it reaches the matching blocks, and that data is
sent as literal data instead. Disk images, with their long runs of
identical blocks, are prone to this. The reporter's backups of 32GB
SD card images became much slower and used much more CPU after the
upgrade to 3.5.0.
[ Impact ]
Without the update, an rsync daemon on trixie with a module that
allows anonymous access stays open to remote CPU exhaustion by
unauthenticated clients.
Users of 3.5.0+ds1-0+deb13u1 also keep the #1149604 slowdown. Since
that version is in proposed-updates, the next point release would
also bring the slowdown to trixie users who don't use
trixie-security.
[ Tests ]
The patch adds two upstream regression tests,
testsuite/hashsearch-collision-skip_test.py and
testsuite/hashsearch-dup-chain_test.py. The test runner picks them
up automatically, so they run in the build-time test suite and in
the upstream-tests and upstream-tests-as-root autopkgtests. Both
tests fail against 3.5.0+ds1-0+deb13u1 and pass with this update.
The package builds, and the build-time test suite and all
autopkgtests pass.
[ Risks ]
Low. The change is upstream commit a7404a9a, released in upstream
3.5.2, and it only touches hash_search() in match.c (+45/-9 lines),
the sender's block-matching loop. It doesn't change the protocol,
so patched and unpatched peers interoperate.
At worst, the new logic makes the sender miss a block it could have
matched. That data is then sent as literal data, so the result is
still correct and only the transfer size grows. Upstream's tests
cover --inplace, the exact skip boundaries, and the case where more
literal data is sent.
[ Checklist ]
[x] *all* changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in (old)stable
[x] the issue is verified as fixed in unstable
[ Changes ]
* d/patches/CVE-2026-119741.patch: upstream commit a7404a9a ("match:
bound hash_search collision work (GH #1132)"). Only the context was
refreshed: the patched source is identical to applying the
upstream commit itself to 3.5.0+ds1-0+deb13u1. In hash_search():
- When a chain entry fails the strong checksum comparison, later
entries in that chain with the same strong checksum are unlinked
instead of being checked again. Duplicate blocks then no longer
use up the MAX_CHAIN_LEN budget and hide matching blocks
(#1149604). With --inplace, an entry pinned with
SUMFLG_SAME_OFFSET is only unlinked in favour of another pinned
entry.
- The block length is now compared together with the weak
checksum, before the entry counts towards MAX_CHAIN_LEN.
- After 4 consecutive offsets that needed a strong checksum but
found no match, the search advances by a full block instead of a
single byte. This bounds the strong checksum work
(CVE-2026-119741).
- It adds the two regression tests mentioned above.
* d/patches/series: apply the new patch.
* d/changelog: new entry, closing #1149604.
[ Other info ]
The debdiff is against 3.5.0+ds1-0+deb13u1, which came through
trixie-security (DSA-6527-1) and is now in proposed-updates.
The fix is in unstable (3.5.2+ds1-1) but hasn't reached testing,
because #1153316 blocks its migration. That bug is a riscv64 FTBFS
where aligned_overflow_test.py hits its 240s timeout. The test comes
from a separate upstream change (GH #1133), which isn't part of this
update. In that same riscv64 build, the two tests added here passed.
Given the simplicity of the backporting changes and the confirmation of fix,
I'm uploading this to trixie at the same time I'm opening this pu request.
Thank you,