Use-After-Free Flaw in rsync Xattr Handling Exposes Receivers to Heap Corruption
Vulnerability Disclosure · 4 sources · Updated 5mo ago · First seen Apr 16, 2026

A publicly disclosed vulnerability in rsync affects versions 3.0.1 through 3.4.1, as well as the 3.4.2 development head, due to a use-after-free bug in the receive_xattr() function. The flaw occurs because rsync uses a wire-supplied extended-attribute count as the length for qsort() instead of the number of accepted xattrs, which can pull stale entries from prior files into the current file's xattr list. A malicious rsync sender can trigger dangling pointers, read-after-free, double-free, heap corruption, information disclosure, and denial of service in the receiving process over the network.
The bug was traced to commit d724dd186, introduced during development of rsync 3.0.1pre1 in 2008 when sorting was added after namespace prefix munging for --fake-super mode. On Linux, exploitation requires --xattrs together with --fake-super or certain xattr filter configurations, while on FreeBSD, macOS, and other non-Linux platforms, any use of -X/--xattrs is vulnerable. The reported fix is to replace the qsort() count argument with temp_xattr.count, while public discussion on oss-sec also raised questions about whether and when rsync maintainers had been notified before disclosure.


