Opened 2 months ago

Closed 2 months ago

#20929 closed enhancement (fixed)

rsync-3.4.0

Reported by: Douglas R. Reno Owned by: Douglas R. Reno
Priority: high Milestone: 12.3
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

New minor version

This update is considered critical. ALL users who have it installed, regardless of client or server, should update immediately.

Change History (4)

comment:1 by Douglas R. Reno, 2 months ago

NEWS for rsync 3.4.0 (15 Jan 2025)

Release 3.4.0 is a security release that fixes a number of important vulnerabilities.

For more details on the vulnerabilities please see the CERT report https://kb.cert.org/vuls/id/952657

Changes in this version:

PROTOCOL NUMBER:

    The protocol number was changed to 32 to make it easier for administrators to check 
their servers have been updated

SECURITY FIXES:

Many thanks to Simon Scannell, Pedro Gallegos, and Jasiel Spelman at Google Cloud 
Vulnerability Research and Aleksei Gorban (Loqpa) for discovering these vulnerabilities 
and working with the rsync project to develop and test fixes.

    CVE-2024-12084 -⁠ Heap Buffer Overflow in Checksum Parsing.

    CVE-2024-12085 -⁠ Info Leak via uninitialized Stack contents defeats ASLR.

    CVE-2024-12086 -⁠ Server leaks arbitrary client files.

    CVE-2024-12087 -⁠ Server can make client write files outside of destination directory 
using symbolic links.

    CVE-2024-12088 -⁠ -⁠-⁠safe-links Bypass.

    CVE-2024-12747 -⁠ symlink race condition.

BUG FIXES:

    Fixed the included popt to avoid a memory error on modern gcc versions.

    Fixed an incorrect extern variable's type that caused an ACL issue on macOS.

    Fixed IPv6 configure check

INTERNAL:

    Updated included popt to version 1.19.

DEVELOPER RELATED:

    Various improvements to the release scripts and git setup.

    Improved packaging/var-checker to identify variable type issues.

    added FreeBSD and Solaris CI builds

comment:2 by Douglas R. Reno, 2 months ago

I also got an email this morning about this from an Incident Commander at Red Hat Product Security (sent to oss-security):

Hello OSS-security,

Two independent groups of researchers have identified a total of 6
vulnerabilities in rsync. In the most severe CVE, an attacker only requires
anonymous read access to a rsync server, such as a public mirror, to
execute arbitrary code on the machine the server is running on.

Upstream has prepared patches for these CVEs. These fixes will be included
in rsync 3.4.0 which is to be released shortly.

CVE Details:
[1] Heap Buffer Overflow in Rsync due to Improper Checksum Length Handling

CVE ID: CVE-2024-12084

CVSS 3.1: 9.8 - AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Description: A heap-based buffer overflow flaw was found in the rsync
daemon. This issue is due to improper handling of attacker-controlled
checksum lengths (s2length) in the code. When MAX_DIGEST_LEN exceeds the
fixed SUM_LENGTH (16 bytes), an attacker can write out of bounds in the
sum2 buffer.

Affected Versions: >= 3.2.7 and < 3.4.0
Reporters: Simon Scannell from Google, Pedro Gallegos from Google, Jasiel
Spelman from Google

Mitigation: Disable SHA* support by compiling with
CFLAGS=-DDISABLE_SHA512_DIGEST and CFLAGS=-DDISABLE_SHA256_DIGEST.

----------

[2] Info Leak via Uninitialized Stack Contents

CVE ID: CVE-2024-12085

CVSS 3.1: 7.5 - AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Description: A flaw was found in the rsync daemon which could be triggered
when rsync compares file checksums. This flaw allows an attacker to
manipulate the checksum length (s2length) to cause a comparison between a
checksum and uninitialized memory and leak one byte of uninitialized stack
data at a time.

Affected Versions: < 3.4.0

Reporters: Simon Scannell from Google, Pedro Gallegos from Google, Jasiel
Spelman from Google

Mitigation: Compile with -ftrivial-auto-var-init=zero to zero the stack
contents.

----------

[3] Rsync Server Leaks Arbitrary Client Files

CVE ID: CVE-2024-12086

CVSS 3.1: 6.1 - AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N

Description: A flaw was found in rsync. It could allow a server to
enumerate the contents of an arbitrary file from the client's machine. This
issue occurs when files are being copied from a client to a server. During
this process, the rsync server will send checksums of local data to the
client to compare with in order to determine what data needs to be sent to
the server. By sending specially constructed checksum values for arbitrary
files, an attacker may be able to reconstruct the data of those files
byte-by-byte based on the responses from the client.

Affected Versions: < 3.4.0

Reporters: Simon Scannell from Google, Pedro Gallegos from Google, Jasiel
Spelman from Google

----------

[4] Path Traversal Vulnerability in Rsync

CVE ID: CVE-2024-12087

CVSS 3.1: 6.5 - AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Description: A path traversal vulnerability exists in rsync. It stems from
behavior enabled by the `--inc-recursive` option, a default-enabled option
for many client options and can be enabled by the server even if not
explicitly enabled by the client. When using the `--inc-recursive` option,
a lack of proper symlink verification coupled with deduplication checks
occurring on a per-file-list basis could allow a server to write files
outside of the client's intended destination directory. A malicious server
could write malicious files to arbitrary locations named after valid
directories/paths on the client.

Affected Versions: < 3.4.0
Reporters: Simon Scannell from Google, Pedro Gallegos from Google, Jasiel
Spelman from Google

----------

[5] --safe-links Option Bypass Leads to Path Traversal

CVE ID: CVE-2024-12088

CVSS 3.1: 6.5 - AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Description: A flaw was found in rsync. When using the `--safe-links`
option, rsync fails to properly verify if a symbolic link destination
contains another symbolic link within it. This results in a path traversal
vulnerability, which may lead to arbitrary file write outside the desired
directory.

Affected Versions: < 3.4.0

Reporters: Simon Scannell from Google, Pedro Gallegos from Google, Jasiel
Spelman from Google

----------

[6] Race Condition in Rsync Handling Symbolic Links

CVE ID: CVE-2024-12747

CVSS 3.1: 5.6 - AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N

Description: A flaw was found in rsync. This vulnerability arises from a
race condition during rsync's handling of symbolic links. Rsync's default
behavior when encountering symbolic links is to skip them. If an attacker
replaced a regular file with a symbolic link at the right time, it was
possible to bypass the default behavior and traverse symbolic links.
Depending on the privileges of the rsync process, an attacker could leak
sensitive information, potentially leading to privilege escalation.

Affected Versions: < 3.4.0

Reporters: Aleksei Gorban "loqpa"

Best Regards,

Red Hat Product Security

Nick Tait

comment:3 by Douglas R. Reno, 2 months ago

Owner: changed from blfs-book to Douglas R. Reno
Status: newassigned

comment:4 by Douglas R. Reno, 2 months ago

Resolution: fixed
Status: assignedclosed

Fixed at 91f9722156a0afaa9be2b8f06f8e6db5f0220d25

SA-12.2-065 issued

Note: See TracTickets for help on using tickets.