diff options
Diffstat (limited to 'meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch')
-rw-r--r-- | meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch b/meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch new file mode 100644 index 0000000000..64d0d96486 --- /dev/null +++ b/meta/recipes-core/dropbear/dropbear/CVE-2020-36254.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From c96c48d62aefc372f2105293ddf8cff2d116dc3a Mon Sep 17 00:00:00 2001 | ||
2 | From: Haelwenn Monnier <contact+github.com@hacktivis.me> | ||
3 | Date: Mon, 25 May 2020 14:54:29 +0200 | ||
4 | Subject: [PATCH] scp.c: Port OpenSSH CVE-2018-20685 fix (#80) | ||
5 | |||
6 | Reference: | ||
7 | https://github.com/mkj/dropbear/commit/8f8a3dff705fad774a10864a2e3dbcfa9779ceff | ||
8 | |||
9 | CVE: CVE-2020-36254 | ||
10 | Upstream-Status: Backport | ||
11 | |||
12 | --- | ||
13 | scp.c | 3 ++- | ||
14 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/scp.c b/scp.c | ||
17 | index 742ae00..7b8e7d2 100644 | ||
18 | --- a/scp.c | ||
19 | +++ b/scp.c | ||
20 | @@ -935,7 +935,8 @@ sink(int argc, char **argv) | ||
21 | size = size * 10 + (*cp++ - '0'); | ||
22 | if (*cp++ != ' ') | ||
23 | SCREWUP("size not delimited"); | ||
24 | - if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) { | ||
25 | + if (*cp == '\0' || strchr(cp, '/') != NULL || | ||
26 | + strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) { | ||
27 | run_err("error: unexpected filename: %s", cp); | ||
28 | exit(1); | ||
29 | } | ||