rsync Use-After-Free Vulnerability in receive_xattr Function

Vulnerability

A use-after-free vulnerability has been identified in rsync versions 3.0.1 through 3.4.1. The issue arises in the receive_xattr function, where an untrusted length value is used in a qsort call, leading to a use-after-free condition on the receiver side. This vulnerability is triggered when rsync is run with the -X (or --xattrs) option. On Linux, many common configurations are vulnerable, while non-Linux platforms are more widely affected.

Impact

Exploitation of this vulnerability causes a segmentation fault in the rsync process, crashing the receiver. However, the vulnerability also introduces use-after-free conditions that can be exploited to create dangling pointers, leading to double-free scenarios or free-of-allocated-memory conditions, which can corrupt the heap state.

Reproduction

To reproduce this vulnerability, a file must be transferred using rsync from a Linux sender to a non-Linux receiver, such as FreeBSD, while the receiver is running as a non-root user. The sender must include non-user namespace extended attributes, which can be achieved by using rsync with the -X option. The receiver will crash due to the use-after-free vulnerability when it processes the extended attributes.

Remediation

Users can upgrade to rsync version 3.4.2 or later, where this vulnerability has been fixed.

Added: Apr 16, 2026, 7:32 AM
Updated: Apr 16, 2026, 7:32 AM

Vulnerability Rating

Custom Algorithm
spread
8.1
impact
5.0
exploitability
7.6
remediation
8.3
relevance
6.1
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.