summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2018-02-09 05:26:28 (GMT)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-02-10 09:13:03 (GMT)
commit4652f5940137a03509ea3f4b32e50576a7ff7385 (patch)
tree456e225b06b5ba58b0d883e7f442cc92cc5181f6
parent86e027f6d3eee30304da6a4fff84c808cd79182f (diff)
downloadbuildroot-4652f5940137a03509ea3f4b32e50576a7ff7385.tar.gz
buildroot-4652f5940137a03509ea3f4b32e50576a7ff7385.tar.bz2
rsync: security bump to version 3.1.3
Fixes CVE-2018-5764: remote attackers can bypass an argument-sanitization protection mechanism Drop upstream patches. Add license file hash. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--package/rsync/0001-Check-fname-in-recv_files-sooner.patch45
-rw-r--r--package/rsync/0002-Sanitize-xname-in-read_ndx_and_attrs.patch39
-rw-r--r--package/rsync/0003-Check-daemon-filter-against-fnamecmp-in-recv_files.patch28
-rw-r--r--package/rsync/0004-Enforce-trailing-0-when-receiving-xattr-name-values.patch33
-rw-r--r--package/rsync/rsync.hash5
-rw-r--r--package/rsync/rsync.mk2
6 files changed, 5 insertions, 147 deletions
diff --git a/package/rsync/0001-Check-fname-in-recv_files-sooner.patch b/package/rsync/0001-Check-fname-in-recv_files-sooner.patch
deleted file mode 100644
index 3616960..0000000
--- a/package/rsync/0001-Check-fname-in-recv_files-sooner.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 3e06d40029cfdce9d0f73d87cfd4edaf54be9c51 Mon Sep 17 00:00:00 2001
-From: Jeriko One <jeriko.one@gmx.us>
-Date: Thu, 2 Nov 2017 23:44:19 -0700
-Subject: [PATCH] Check fname in recv_files sooner.
-
-Signed-off-by: Baruch Siach <baruch@tkos.co.il>
----
-Patch status: upstream commit 3e06d40029c
-
- receiver.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/receiver.c b/receiver.c
-index baae3a919cdd..9fdafa152cb3 100644
---- a/receiver.c
-+++ b/receiver.c
-@@ -574,6 +574,12 @@ int recv_files(int f_in, int f_out, char *local_name)
- file = dir_flist->files[cur_flist->parent_ndx];
- fname = local_name ? local_name : f_name(file, fbuf);
-
-+ if (daemon_filter_list.head
-+ && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0) {
-+ rprintf(FERROR, "attempt to hack rsync failed.\n");
-+ exit_cleanup(RERR_PROTOCOL);
-+ }
-+
- if (DEBUG_GTE(RECV, 1))
- rprintf(FINFO, "recv_files(%s)\n", fname);
-
-@@ -645,12 +651,6 @@ int recv_files(int f_in, int f_out, char *local_name)
-
- cleanup_got_literal = 0;
-
-- if (daemon_filter_list.head
-- && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0) {
-- rprintf(FERROR, "attempt to hack rsync failed.\n");
-- exit_cleanup(RERR_PROTOCOL);
-- }
--
- if (read_batch) {
- int wanted = redoing
- ? we_want_redo(ndx)
---
-2.15.0
-
diff --git a/package/rsync/0002-Sanitize-xname-in-read_ndx_and_attrs.patch b/package/rsync/0002-Sanitize-xname-in-read_ndx_and_attrs.patch
deleted file mode 100644
index 1e5d371..0000000
--- a/package/rsync/0002-Sanitize-xname-in-read_ndx_and_attrs.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 70aeb5fddd1b2f8e143276f8d5a085db16c593b9 Mon Sep 17 00:00:00 2001
-From: Jeriko One <jeriko.one@gmx.us>
-Date: Thu, 16 Nov 2017 17:05:42 -0800
-Subject: [PATCH] Sanitize xname in read_ndx_and_attrs.
-
-Signed-off-by: Baruch Siach <baruch@tkos.co.il>
----
-Patch status: upstream commit 70aeb5fddd
-
- rsync.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/rsync.c b/rsync.c
-index b82e59881018..a0945ba4e7f5 100644
---- a/rsync.c
-+++ b/rsync.c
-@@ -49,6 +49,7 @@ extern int flist_eof;
- extern int file_old_total;
- extern int keep_dirlinks;
- extern int make_backups;
-+extern int sanitize_paths;
- extern struct file_list *cur_flist, *first_flist, *dir_flist;
- extern struct chmod_mode_struct *daemon_chmod_modes;
- #ifdef ICONV_OPTION
-@@ -396,6 +397,11 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr,
- if (iflags & ITEM_XNAME_FOLLOWS) {
- if ((len = read_vstring(f_in, buf, MAXPATHLEN)) < 0)
- exit_cleanup(RERR_PROTOCOL);
-+
-+ if (sanitize_paths) {
-+ sanitize_path(buf, buf, "", 0, SP_DEFAULT);
-+ len = strlen(buf);
-+ }
- } else {
- *buf = '\0';
- len = -1;
---
-2.15.0
-
diff --git a/package/rsync/0003-Check-daemon-filter-against-fnamecmp-in-recv_files.patch b/package/rsync/0003-Check-daemon-filter-against-fnamecmp-in-recv_files.patch
deleted file mode 100644
index b19921c..0000000
--- a/package/rsync/0003-Check-daemon-filter-against-fnamecmp-in-recv_files.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 5509597decdbd7b91994210f700329d8a35e70a1 Mon Sep 17 00:00:00 2001
-From: Jeriko One <jeriko.one@gmx.us>
-Date: Thu, 16 Nov 2017 17:26:03 -0800
-Subject: [PATCH] Check daemon filter against fnamecmp in recv_files().
-
-Signed-off-by: Baruch Siach <baruch@tkos.co.il>
----
-Patch status: upstream commit 5509597dec
-
- receiver.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/receiver.c b/receiver.c
-index 9fdafa152cb3..9c46242e013c 100644
---- a/receiver.c
-+++ b/receiver.c
-@@ -722,7 +722,7 @@ int recv_files(int f_in, int f_out, char *local_name)
- break;
- }
- if (!fnamecmp || (daemon_filter_list.head
-- && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0)) {
-+ && check_filter(&daemon_filter_list, FLOG, fnamecmp, 0) < 0)) {
- fnamecmp = fname;
- fnamecmp_type = FNAMECMP_FNAME;
- }
---
-2.15.0
-
diff --git a/package/rsync/0004-Enforce-trailing-0-when-receiving-xattr-name-values.patch b/package/rsync/0004-Enforce-trailing-0-when-receiving-xattr-name-values.patch
deleted file mode 100644
index be90400..0000000
--- a/package/rsync/0004-Enforce-trailing-0-when-receiving-xattr-name-values.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 47a63d90e71d3e19e0e96052bb8c6b9cb140ecc1 Mon Sep 17 00:00:00 2001
-From: Wayne Davison <wayned@samba.org>
-Date: Sun, 5 Nov 2017 11:33:15 -0800
-Subject: [PATCH] Enforce trailing \0 when receiving xattr name values. Fixes
- bug 13112.
-
-Fixes CVE-2017-16548
-
-Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
----
-Patch status: upstream commit 47a63d90e7
-
- xattrs.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/xattrs.c b/xattrs.c
-index 68305d75..4867e6f5 100644
---- a/xattrs.c
-+++ b/xattrs.c
-@@ -824,6 +824,10 @@ void receive_xattr(int f, struct file_struct *file)
- out_of_memory("receive_xattr");
- name = ptr + dget_len + extra_len;
- read_buf(f, name, name_len);
-+ if (name_len < 1 || name[name_len-1] != '\0') {
-+ rprintf(FERROR, "Invalid xattr name received (missing trailing \\0).\n");
-+ exit_cleanup(RERR_FILEIO);
-+ }
- if (dget_len == datum_len)
- read_buf(f, ptr, dget_len);
- else {
---
-2.11.0
-
diff --git a/package/rsync/rsync.hash b/package/rsync/rsync.hash
index 6311116..2da62a1 100644
--- a/package/rsync/rsync.hash
+++ b/package/rsync/rsync.hash
@@ -1,2 +1,5 @@
# Locally calculated after checking pgp signature
-sha256 ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2 rsync-3.1.2.tar.gz
+# https://download.samba.org/pub/rsync/src/rsync-3.1.3.tar.gz.asc
+sha256 55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0 rsync-3.1.3.tar.gz
+# Locally calculated
+sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
diff --git a/package/rsync/rsync.mk b/package/rsync/rsync.mk
index e6b955a..52875e4 100644
--- a/package/rsync/rsync.mk
+++ b/package/rsync/rsync.mk
@@ -4,7 +4,7 @@
#
################################################################################
-RSYNC_VERSION = 3.1.2
+RSYNC_VERSION = 3.1.3
RSYNC_SITE = http://rsync.samba.org/ftp/rsync/src
RSYNC_LICENSE = GPL-3.0+
RSYNC_LICENSE_FILES = COPYING