summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rsync/files/0001-Fix-relative-when-copying-an-absolute-path.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rsync/files/0001-Fix-relative-when-copying-an-absolute-path.patch')
-rw-r--r--meta/recipes-devtools/rsync/files/0001-Fix-relative-when-copying-an-absolute-path.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rsync/files/0001-Fix-relative-when-copying-an-absolute-path.patch b/meta/recipes-devtools/rsync/files/0001-Fix-relative-when-copying-an-absolute-path.patch
new file mode 100644
index 0000000000..b2e02dba97
--- /dev/null
+++ b/meta/recipes-devtools/rsync/files/0001-Fix-relative-when-copying-an-absolute-path.patch
@@ -0,0 +1,31 @@
1From fabef23bea6e9963c06e218586fda1a823e3c6bf Mon Sep 17 00:00:00 2001
2From: Wayne Davison <wayne@opencoder.net>
3Date: Mon, 8 Aug 2022 21:30:21 -0700
4Subject: [PATCH] Fix --relative when copying an absolute path.
5
6CVE: CVE-2022-29154
7Upstream-Status: Backport [https://github.com/WayneD/rsync/commit/fabef23bea6e9963c06e218586fda1a823e3c6bf]
8Signed-off-by: Matthias Schmitz <matthias.schmitz@port4949.net>
9---
10 exclude.c | 4 +++-
11 1 file changed, 3 insertions(+), 1 deletion(-)
12
13diff --git a/exclude.c b/exclude.c
14index 2394023f..ba5ca5a3 100644
15--- a/exclude.c
16+++ b/exclude.c
17@@ -434,8 +434,10 @@ void add_implied_include(const char *arg)
18 *p++ = *cp++;
19 break;
20 case '/':
21- if (p[-1] == '/') /* This is safe because of the initial slash. */
22+ if (p[-1] == '/') { /* This is safe because of the initial slash. */
23+ cp++;
24 break;
25+ }
26 if (relative_paths) {
27 filter_rule const *ent;
28 int found = 0;
29--
302.39.2
31