summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rsync/rsync-3.1.1/rsync.git-eac858085.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rsync/rsync-3.1.1/rsync.git-eac858085.patch')
-rw-r--r--meta/recipes-devtools/rsync/rsync-3.1.1/rsync.git-eac858085.patch102
1 files changed, 0 insertions, 102 deletions
diff --git a/meta/recipes-devtools/rsync/rsync-3.1.1/rsync.git-eac858085.patch b/meta/recipes-devtools/rsync/rsync-3.1.1/rsync.git-eac858085.patch
deleted file mode 100644
index c86f478ef1..0000000000
--- a/meta/recipes-devtools/rsync/rsync-3.1.1/rsync.git-eac858085.patch
+++ /dev/null
@@ -1,102 +0,0 @@
1From eac858085e3ac94ec0ab5061d11f52652c90a869 Mon Sep 17 00:00:00 2001
2From: Wayne Davison <wayned@samba.org>
3Date: Mon, 11 May 2015 12:36:20 -0700
4Subject: [PATCH 1/1] Add compat flag to allow proper seed checksum order.
5 Fixes the equivalent of librsync's CVE-2014-8242 issue.
6
7Upstream-Status: Backport
8CVE: CVE-2014-8242
9
10Signed-off-by: Roy Li <rongqing.li@windriver.com>
11---
12 checksum.c | 17 +++++++++++++----
13 compat.c | 5 +++++
14 options.c | 1 +
15 3 files changed, 19 insertions(+), 4 deletions(-)
16
17diff --git a/checksum.c b/checksum.c
18index a1c2aa2..933b514 100644
19--- a/checksum.c
20+++ b/checksum.c
21@@ -23,6 +23,7 @@
22
23 extern int checksum_seed;
24 extern int protocol_version;
25+extern int proper_seed_order;
26
27 /*
28 a simple 32 bit checksum that can be upadted from either end
29@@ -54,10 +55,18 @@ void get_checksum2(char *buf, int32 len, char *sum)
30 if (protocol_version >= 30) {
31 uchar seedbuf[4];
32 md5_begin(&m);
33- md5_update(&m, (uchar *)buf, len);
34- if (checksum_seed) {
35- SIVALu(seedbuf, 0, checksum_seed);
36- md5_update(&m, seedbuf, 4);
37+ if (proper_seed_order) {
38+ if (checksum_seed) {
39+ SIVALu(seedbuf, 0, checksum_seed);
40+ md5_update(&m, seedbuf, 4);
41+ }
42+ md5_update(&m, (uchar *)buf, len);
43+ } else {
44+ md5_update(&m, (uchar *)buf, len);
45+ if (checksum_seed) {
46+ SIVALu(seedbuf, 0, checksum_seed);
47+ md5_update(&m, seedbuf, 4);
48+ }
49 }
50 md5_result(&m, (uchar *)sum);
51 } else {
52diff --git a/compat.c b/compat.c
53index 2454937..f89d466 100644
54--- a/compat.c
55+++ b/compat.c
56@@ -27,6 +27,7 @@ int inc_recurse = 0;
57 int compat_flags = 0;
58 int use_safe_inc_flist = 0;
59 int want_xattr_optim = 0;
60+int proper_seed_order = 0;
61
62 extern int am_server;
63 extern int am_sender;
64@@ -78,6 +79,7 @@ int filesfrom_convert = 0;
65 #define CF_SYMLINK_ICONV (1<<2)
66 #define CF_SAFE_FLIST (1<<3)
67 #define CF_AVOID_XATTR_OPTIM (1<<4)
68+#define CF_CHKSUM_SEED_FIX (1<<5)
69
70 static const char *client_info;
71
72@@ -271,12 +273,15 @@ void setup_protocol(int f_out,int f_in)
73 compat_flags |= CF_SAFE_FLIST;
74 if (local_server || strchr(client_info, 'x') != NULL)
75 compat_flags |= CF_AVOID_XATTR_OPTIM;
76+ if (local_server || strchr(client_info, 'C') != NULL)
77+ compat_flags |= CF_CHKSUM_SEED_FIX;
78 write_byte(f_out, compat_flags);
79 } else
80 compat_flags = read_byte(f_in);
81 /* The inc_recurse var MUST be set to 0 or 1. */
82 inc_recurse = compat_flags & CF_INC_RECURSE ? 1 : 0;
83 want_xattr_optim = protocol_version >= 31 && !(compat_flags & CF_AVOID_XATTR_OPTIM);
84+ proper_seed_order = compat_flags & CF_CHKSUM_SEED_FIX ? 1 : 0;
85 if (am_sender) {
86 receiver_symlink_times = am_server
87 ? strchr(client_info, 'L') != NULL
88diff --git a/options.c b/options.c
89index 19c2b7d..4128b59 100644
90--- a/options.c
91+++ b/options.c
92@@ -2503,6 +2503,7 @@ void server_options(char **args, int *argc_p)
93 #endif
94 argstr[x++] = 'f'; /* flist I/O-error safety support */
95 argstr[x++] = 'x'; /* xattr hardlink optimization not desired */
96+ argstr[x++] = 'C'; /* support checksum seed order fix */
97 }
98
99 if (x >= (int)sizeof argstr) { /* Not possible... */
100--
1011.9.1
102