Gentoo Logo

rsync: exploitable heap overflow


1.  Gentoo Linux Security Advisory

Version Information

Advisory Reference GLSA 200312-03 / rsync
Release Date December 4, 2003
Latest Revision December 4, 2003: 01
Impact high
Exploitable remote
Package Vulnerable versions Unaffected versions Architecture(s)
net-misc/rsync < 2.5.7 >= 2.5.7 All supported architectures

Related bugreports: No related gentoo bugreports


rsync contains a heap overflow vulnerability that can be used to execute arbitrary code.

2.  Impact Information


rsync is a popular file transfer package used to synchronize the Portage tree.


Rsync version 2.5.6 contains a vulnerability that can be used to run arbitrary code. The Gentoo infrastructure team has some reasonably good forensic evidence that this exploit may have been used in combination with the Linux kernel do_brk() vulnerability (see GLSA 200312-02) to exploit a rotation server (see GLSA-200312-01.)

Please see for the security advisory released by the rsync development team.


A remote attacker could execute arbitrary code with the permissions of the root user.

3.  Resolution Information


There is no known workaround at this time.


To address this vulnerability, all Gentoo users should read GLSA-200312-02 and ensure that all systems are upgraded to a version of the Linux kernel without the do_brk() vulnerability, and upgrade to version 2.5.7 of rsync:

Code Listing 3.1: Resolution

# emerge sync
# emerge -pv '>=net-misc/rsync-2.5.7'
# emerge '>=net-misc/rsync-2.5.7'
# emerge clean

Review your /etc/rsync/rsyncd.conf configuration file; ensure that the use chroot="no" command is commented out or removed, or change use chroot="no" to use chroot="yes". Then, if necessary, restart rsyncd:

Code Listing 3.2: Resolution

# /etc/init.d/rsyncd restart

4.  References


Page updated December 4, 2003

Summary: This is a Gentoo Linux Security Advisory

Security Team
Contact Address

Donate to support our development efforts.

Copyright 2001-2015 Gentoo Foundation, Inc. Questions, Comments? Contact us.