summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rsync/files/CVE-2016-9842.patch
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2019-08-21 09:58:16 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-30 16:44:42 +0100
commitc5463adc43bacaa0a8cbbeb32b4b02554186e3e1 (patch)
tree554566a7038c6efd1f105a2c1ff941d99daee700 /meta/recipes-devtools/rsync/files/CVE-2016-9842.patch
parent5743d1591b43de91e02da43b505b90c7ebbc5fd4 (diff)
downloadpoky-c5463adc43bacaa0a8cbbeb32b4b02554186e3e1.tar.gz
rsync: fix CVEs for included zlib
rsync includes its own copy of zlib and doesn't recommend linking with the system version [1]. Import CVE fixes that impact zlib version 1.2.8 [2] that is currently used by rsync. [1] https://git.samba.org/rsync.git/?p=rsync.git;a=blob;f=zlib/README.rsync [2] https://nvd.nist.gov/vuln/search/results?form_type=Advanced&cves=on&cpe_version=cpe%3a%2fa%3agnu%3azlib%3a1.2.8 (From OE-Core rev: a55fbb4cb489853dfb0b4553f6e187c3f3633f48) (From OE-Core rev: 93ce13106abc05f4a68a6265590e3770f0bf49a2) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rsync/files/CVE-2016-9842.patch')
-rw-r--r--meta/recipes-devtools/rsync/files/CVE-2016-9842.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rsync/files/CVE-2016-9842.patch b/meta/recipes-devtools/rsync/files/CVE-2016-9842.patch
new file mode 100644
index 0000000000..810d8a3fdb
--- /dev/null
+++ b/meta/recipes-devtools/rsync/files/CVE-2016-9842.patch
@@ -0,0 +1,33 @@
1From e54e1299404101a5a9d0cf5e45512b543967f958 Mon Sep 17 00:00:00 2001
2From: Mark Adler <madler@alumni.caltech.edu>
3Date: Sat, 5 Sep 2015 17:45:55 -0700
4Subject: [PATCH] Avoid shifts of negative values inflateMark().
5
6The C standard says that bit shifts of negative integers is
7undefined. This casts to unsigned values to assure a known
8result.
9
10CVE: CVE-2016-9842
11Upstream-Status: Backport
12Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
13---
14 inflate.c | 5 +++--
15 1 file changed, 3 insertions(+), 2 deletions(-)
16
17diff --git a/zlib/inflate.c b/zlib/inflate.c
18index 2889e3a0..a7184167 100644
19--- a/zlib/inflate.c
20+++ b/zlib/inflate.c
21@@ -1506,9 +1506,10 @@ z_streamp strm;
22 {
23 struct inflate_state FAR *state;
24
25- if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
26+ if (strm == Z_NULL || strm->state == Z_NULL)
27+ return (long)(((unsigned long)0 - 1) << 16);
28 state = (struct inflate_state FAR *)strm->state;
29- return ((long)(state->back) << 16) +
30+ return (long)(((unsigned long)((long)state->back)) << 16) +
31 (state->mode == COPY ? state->length :
32 (state->mode == MATCH ? state->was - state->length : 0));
33 }