fixed buffer overflow when working with a long file name (#557916)
This commit is contained in:
parent
ab51af2645
commit
c6f2b0ae0e
13
rsync-3.0.7-buf-overflow.patch
Normal file
13
rsync-3.0.7-buf-overflow.patch
Normal file
@ -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));
|
@ -7,13 +7,14 @@
|
|||||||
Summary: A program for synchronizing files over a network
|
Summary: A program for synchronizing files over a network
|
||||||
Name: rsync
|
Name: rsync
|
||||||
Version: 3.0.7
|
Version: 3.0.7
|
||||||
Release: 1%{?prerelease}%{?dist}
|
Release: 2%{?prerelease}%{?dist}
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
URL: http://rsync.samba.org/
|
URL: http://rsync.samba.org/
|
||||||
|
|
||||||
Source0: ftp://rsync.samba.org/pub/rsync/rsync-%{version}%{?prerelease}.tar.gz
|
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
|
Source1: ftp://rsync.samba.org/pub/rsync/rsync-patches-%{version}%{?prerelease}.tar.gz
|
||||||
Source2: rsync.xinetd
|
Source2: rsync.xinetd
|
||||||
|
Patch0: rsync-3.0.7-buf-overflow.patch
|
||||||
BuildRequires: libacl-devel, libattr-devel, autoconf, popt-devel
|
BuildRequires: libacl-devel, libattr-devel, autoconf, popt-devel
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
@ -46,6 +47,7 @@ patch -p1 -i patches/xattrs.diff
|
|||||||
|
|
||||||
#Enable --copy-devices parameter
|
#Enable --copy-devices parameter
|
||||||
patch -p1 -i patches/copy-devices.diff
|
patch -p1 -i patches/copy-devices.diff
|
||||||
|
%patch0 -p1 -b .buf-overflow
|
||||||
|
|
||||||
%build
|
%build
|
||||||
rm -fr autom4te.cache
|
rm -fr autom4te.cache
|
||||||
@ -74,6 +76,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_mandir}/man5/rsyncd.conf.5*
|
%{_mandir}/man5/rsyncd.conf.5*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 22 2010 Jan Zeleny <jzeleny@redhat.com> - 3.0.7-2
|
||||||
|
- fixed issue with buffer overflow when using long filenames (#557916)
|
||||||
|
|
||||||
* Tue Jan 19 2010 Jan Zeleny <jzeleny@redhat.com> - 3.0.7-1
|
* Tue Jan 19 2010 Jan Zeleny <jzeleny@redhat.com> - 3.0.7-1
|
||||||
- rebased to 3.0.7
|
- rebased to 3.0.7
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user