summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/CVE-2019-7282-and-CVE-2019-7283.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/CVE-2019-7282-and-CVE-2019-7283.patch')
-rw-r--r--meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/CVE-2019-7282-and-CVE-2019-7283.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/CVE-2019-7282-and-CVE-2019-7283.patch b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/CVE-2019-7282-and-CVE-2019-7283.patch
new file mode 100644
index 000000000..4381f5bf8
--- /dev/null
+++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/CVE-2019-7282-and-CVE-2019-7283.patch
@@ -0,0 +1,33 @@
1From a7831a16c3e0e1463d5eb08a58af152cb75ca976 Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Mon, 15 Apr 2019 06:05:58 +0000
4Subject: [PATCH] Fix CVE-2019-7282 and CVE-2019-7283
5
6Description: Fix CVE-2018-20685 and CVE-2019-6111
7Bug-Debian: https://bugs.debian.org/920486
8Origin: https://github.com/openssh/openssh-portable/commit/6010c0303a422a9c5fa8860c061bf7105eb7f8b2#diff-9f340c228413d5a9a9206ea2ed2bc624R1114
9
10Upstream-Status: Backport [Debian]
11[https://sources.debian.org/src/netkit-rsh/0.17-20/debian/patches/fix-CVE-2018-20685-and-CVE-2019-6111.patch]
12
13Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
14---
15 rcp/rcp.c | 5 +++++
16 1 file changed, 5 insertions(+)
17
18diff --git a/rcp/rcp.c b/rcp/rcp.c
19index ca61c18..77d8ff8 100644
20--- a/rcp/rcp.c
21+++ b/rcp/rcp.c
22@@ -740,6 +740,11 @@ sink(int argc, char *argv[])
23 size = size * 10 + (*cp++ - '0');
24 if (*cp++ != ' ')
25 SCREWUP("size not delimited");
26+ if (*cp == '\0' || strchr(cp, '/') != NULL ||
27+ strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) {
28+ error("error: unexpected filename: %s", cp);
29+ exit(1);
30+ }
31 if (targisdir) {
32 static char *namebuf;
33 static int cursize;