diff --git a/rsync-3.0.7-buf-overflow.patch b/rsync-3.0.7-buf-overflow.patch new file mode 100644 index 0000000..c93077f --- /dev/null +++ b/rsync-3.0.7-buf-overflow.patch @@ -0,0 +1,13 @@ +--- rsync-3.0.7/flist.c.orig 2010-01-22 22:39:40.000000000 +0100 ++++ rsync-3.0.7/flist.c 2010-01-22 22:45:27.618262042 +0100 +@@ -3025,6 +3025,10 @@ char *f_name(const struct file_struct *f + + if (f->dirname) { + int len = strlen(f->dirname); ++ if (len >= MAXPATHLEN) { ++ rprintf(FWARNING,"Path too long!\n"); ++ return NULL; ++ } + memcpy(fbuf, f->dirname, len); + fbuf[len] = '/'; + strlcpy(fbuf + len + 1, f->basename, MAXPATHLEN - (len + 1)); diff --git a/rsync.spec b/rsync.spec index 3f5918a..3a8faf8 100644 --- a/rsync.spec +++ b/rsync.spec @@ -7,13 +7,14 @@ Summary: A program for synchronizing files over a network Name: rsync Version: 3.0.7 -Release: 1%{?prerelease}%{?dist} +Release: 2%{?prerelease}%{?dist} Group: Applications/Internet URL: http://rsync.samba.org/ Source0: ftp://rsync.samba.org/pub/rsync/rsync-%{version}%{?prerelease}.tar.gz Source1: ftp://rsync.samba.org/pub/rsync/rsync-patches-%{version}%{?prerelease}.tar.gz Source2: rsync.xinetd +Patch0: rsync-3.0.7-buf-overflow.patch BuildRequires: libacl-devel, libattr-devel, autoconf, popt-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) License: GPLv3+ @@ -46,6 +47,7 @@ patch -p1 -i patches/xattrs.diff #Enable --copy-devices parameter patch -p1 -i patches/copy-devices.diff +%patch0 -p1 -b .buf-overflow %build rm -fr autom4te.cache @@ -74,6 +76,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/rsyncd.conf.5* %changelog +* Fri Jan 22 2010 Jan Zeleny - 3.0.7-2 +- fixed issue with buffer overflow when using long filenames (#557916) + * Tue Jan 19 2010 Jan Zeleny - 3.0.7-1 - rebased to 3.0.7