Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/rsync/files/
Date: Sat, 12 May 2018 20:24:38
Message-Id: 1526156399.278a9bb52b5298b1b5a91353d12644df97c75afb.robbat2@gentoo
1 commit: 278a9bb52b5298b1b5a91353d12644df97c75afb
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Sat May 12 15:29:10 2018 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Sat May 12 20:19:59 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=278a9bb5
7
8 net-misc/rsync: remove unused patches
9
10 (cherry picked from commit e1a20f4114d41d76ef0681456001de6356f13d43)
11 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
12 Closes: https://github.com/gentoo/gentoo/pull/8369
13
14 .../rsync/files/rsync-3.1.2-CVE-2017-16548.patch | 17 ----------
15 .../files/rsync-3.1.2-CVE-2017-17433-fixup.patch | 33 ------------------
16 .../rsync/files/rsync-3.1.2-CVE-2017-17433.patch | 39 ----------------------
17 .../files/rsync-3.1.2-CVE-2017-17434-part1.patch | 22 ------------
18 .../files/rsync-3.1.2-CVE-2017-17434-part2.patch | 33 ------------------
19 5 files changed, 144 deletions(-)
20
21 diff --git a/net-misc/rsync/files/rsync-3.1.2-CVE-2017-16548.patch b/net-misc/rsync/files/rsync-3.1.2-CVE-2017-16548.patch
22 deleted file mode 100644
23 index d06607cf772..00000000000
24 --- a/net-misc/rsync/files/rsync-3.1.2-CVE-2017-16548.patch
25 +++ /dev/null
26 @@ -1,17 +0,0 @@
27 -X-Git-Url: https://git.samba.org/rsync.git/?p=rsync.git;a=blobdiff_plain;f=xattrs.c;h=4867e6f5b8ad2934d43b06f3b99b7b3690a6dc7a;hp=68305d7559b34f5cc2f196b74429b82fa6ff49dd;hb=47a63d90e71d3e19e0e96052bb8c6b9cb140ecc1;hpb=bc112b0e7feece62ce98708092306639a8a53cce
28 -
29 -diff --git a/xattrs.c b/xattrs.c
30 -index 68305d7..4867e6f 100644
31 ---- a/xattrs.c
32 -+++ b/xattrs.c
33 -@@ -824,6 +824,10 @@ void receive_xattr(int f, struct file_struct *file)
34 - out_of_memory("receive_xattr");
35 - name = ptr + dget_len + extra_len;
36 - read_buf(f, name, name_len);
37 -+ if (name_len < 1 || name[name_len-1] != '\0') {
38 -+ rprintf(FERROR, "Invalid xattr name received (missing trailing \\0).\n");
39 -+ exit_cleanup(RERR_FILEIO);
40 -+ }
41 - if (dget_len == datum_len)
42 - read_buf(f, ptr, dget_len);
43 - else {
44
45 diff --git a/net-misc/rsync/files/rsync-3.1.2-CVE-2017-17433-fixup.patch b/net-misc/rsync/files/rsync-3.1.2-CVE-2017-17433-fixup.patch
46 deleted file mode 100644
47 index 0cc9b8256dd..00000000000
48 --- a/net-misc/rsync/files/rsync-3.1.2-CVE-2017-17433-fixup.patch
49 +++ /dev/null
50 @@ -1,33 +0,0 @@
51 -From: Wayne Davison <wayned@×××××.org>
52 -Date: Sun, 3 Dec 2017 23:49:56 +0000 (-0800)
53 -Subject: Fix issue with earlier path-check (fixes "make check")
54 -X-Git-Url: https://git.samba.org/?p=rsync.git;a=commitdiff_plain;h=f5e8a17e093065fb20fea00a29540fe2c7896441;hp=5509597decdbd7b91994210f700329d8a35e70a1
55 -
56 -Fix issue with earlier path-check (fixes "make check")
57 ----
58 -
59 -diff --git a/receiver.c b/receiver.c
60 -index 9c46242..75cb00d 100644
61 ---- a/receiver.c
62 -+++ b/receiver.c
63 -@@ -574,15 +574,15 @@ int recv_files(int f_in, int f_out, char *local_name)
64 - file = dir_flist->files[cur_flist->parent_ndx];
65 - fname = local_name ? local_name : f_name(file, fbuf);
66 -
67 -- if (daemon_filter_list.head
68 -- && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0) {
69 -+ if (DEBUG_GTE(RECV, 1))
70 -+ rprintf(FINFO, "recv_files(%s)\n", fname);
71 -+
72 -+ if (daemon_filter_list.head && (*fname != '.' || fname[1] != '\0')
73 -+ && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0) {
74 - rprintf(FERROR, "attempt to hack rsync failed.\n");
75 - exit_cleanup(RERR_PROTOCOL);
76 - }
77 -
78 -- if (DEBUG_GTE(RECV, 1))
79 -- rprintf(FINFO, "recv_files(%s)\n", fname);
80 --
81 - #ifdef SUPPORT_XATTRS
82 - if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers
83 - && !(want_xattr_optim && BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE)))
84
85 diff --git a/net-misc/rsync/files/rsync-3.1.2-CVE-2017-17433.patch b/net-misc/rsync/files/rsync-3.1.2-CVE-2017-17433.patch
86 deleted file mode 100644
87 index 0ab8de1fce3..00000000000
88 --- a/net-misc/rsync/files/rsync-3.1.2-CVE-2017-17433.patch
89 +++ /dev/null
90 @@ -1,39 +0,0 @@
91 -From 3e06d40029cfdce9d0f73d87cfd4edaf54be9c51 Mon Sep 17 00:00:00 2001
92 -From: Jeriko One <jeriko.one@×××.us>
93 -Date: Thu, 2 Nov 2017 23:44:19 -0700
94 -Subject: [PATCH] Check fname in recv_files sooner.
95 -
96 ----
97 - receiver.c | 12 ++++++------
98 - 1 file changed, 6 insertions(+), 6 deletions(-)
99 -
100 -Index: rsync-3.1.2/receiver.c
101 -===================================================================
102 ---- rsync-3.1.2.orig/receiver.c
103 -+++ rsync-3.1.2/receiver.c
104 -@@ -580,6 +580,12 @@ int recv_files(int f_in, int f_out, char
105 - file = dir_flist->files[cur_flist->parent_ndx];
106 - fname = local_name ? local_name : f_name(file, fbuf);
107 -
108 -+ if (daemon_filter_list.head
109 -+ && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0) {
110 -+ rprintf(FERROR, "attempt to hack rsync failed.\n");
111 -+ exit_cleanup(RERR_PROTOCOL);
112 -+ }
113 -+
114 - if (DEBUG_GTE(RECV, 1))
115 - rprintf(FINFO, "recv_files(%s)\n", fname);
116 -
117 -@@ -651,12 +657,6 @@ int recv_files(int f_in, int f_out, char
118 -
119 - cleanup_got_literal = 0;
120 -
121 -- if (daemon_filter_list.head
122 -- && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0) {
123 -- rprintf(FERROR, "attempt to hack rsync failed.\n");
124 -- exit_cleanup(RERR_PROTOCOL);
125 -- }
126 --
127 - if (read_batch) {
128 - int wanted = redoing
129 - ? we_want_redo(ndx)
130
131 diff --git a/net-misc/rsync/files/rsync-3.1.2-CVE-2017-17434-part1.patch b/net-misc/rsync/files/rsync-3.1.2-CVE-2017-17434-part1.patch
132 deleted file mode 100644
133 index aeb8c2ee33c..00000000000
134 --- a/net-misc/rsync/files/rsync-3.1.2-CVE-2017-17434-part1.patch
135 +++ /dev/null
136 @@ -1,22 +0,0 @@
137 -From 5509597decdbd7b91994210f700329d8a35e70a1 Mon Sep 17 00:00:00 2001
138 -From: Jeriko One <jeriko.one@×××.us>
139 -Date: Thu, 16 Nov 2017 17:26:03 -0800
140 -Subject: [PATCH] Check daemon filter against fnamecmp in recv_files().
141 -
142 ----
143 - receiver.c | 2 +-
144 - 1 file changed, 1 insertion(+), 1 deletion(-)
145 -
146 -Index: rsync-3.1.2/receiver.c
147 -===================================================================
148 ---- rsync-3.1.2.orig/receiver.c
149 -+++ rsync-3.1.2/receiver.c
150 -@@ -728,7 +728,7 @@ int recv_files(int f_in, int f_out, char
151 - break;
152 - }
153 - if (!fnamecmp || (daemon_filter_list.head
154 -- && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0)) {
155 -+ && check_filter(&daemon_filter_list, FLOG, fnamecmp, 0) < 0)) {
156 - fnamecmp = fname;
157 - fnamecmp_type = FNAMECMP_FNAME;
158 - }
159
160 diff --git a/net-misc/rsync/files/rsync-3.1.2-CVE-2017-17434-part2.patch b/net-misc/rsync/files/rsync-3.1.2-CVE-2017-17434-part2.patch
161 deleted file mode 100644
162 index 5b94efa0c1a..00000000000
163 --- a/net-misc/rsync/files/rsync-3.1.2-CVE-2017-17434-part2.patch
164 +++ /dev/null
165 @@ -1,33 +0,0 @@
166 -From 70aeb5fddd1b2f8e143276f8d5a085db16c593b9 Mon Sep 17 00:00:00 2001
167 -From: Jeriko One <jeriko.one@×××.us>
168 -Date: Thu, 16 Nov 2017 17:05:42 -0800
169 -Subject: [PATCH] Sanitize xname in read_ndx_and_attrs.
170 -
171 ----
172 - rsync.c | 6 ++++++
173 - 1 file changed, 6 insertions(+)
174 -
175 -Index: rsync-3.1.2/rsync.c
176 -===================================================================
177 ---- rsync-3.1.2.orig/rsync.c
178 -+++ rsync-3.1.2/rsync.c
179 -@@ -50,6 +50,7 @@ extern int flist_eof;
180 - extern int file_old_total;
181 - extern int keep_dirlinks;
182 - extern int make_backups;
183 -+extern int sanitize_paths;
184 - extern struct file_list *cur_flist, *first_flist, *dir_flist;
185 - extern struct chmod_mode_struct *daemon_chmod_modes;
186 - #ifdef ICONV_OPTION
187 -@@ -397,6 +398,11 @@ int read_ndx_and_attrs(int f_in, int f_o
188 - if (iflags & ITEM_XNAME_FOLLOWS) {
189 - if ((len = read_vstring(f_in, buf, MAXPATHLEN)) < 0)
190 - exit_cleanup(RERR_PROTOCOL);
191 -+
192 -+ if (sanitize_paths) {
193 -+ sanitize_path(buf, buf, "", 0, SP_DEFAULT);
194 -+ len = strlen(buf);
195 -+ }
196 - } else {
197 - *buf = '\0';
198 - len = -1;