diff options
Diffstat (limited to 'meta/recipes-extended/libsolv/files/CVE-2021-3200.patch')
-rw-r--r-- | meta/recipes-extended/libsolv/files/CVE-2021-3200.patch | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/meta/recipes-extended/libsolv/files/CVE-2021-3200.patch b/meta/recipes-extended/libsolv/files/CVE-2021-3200.patch new file mode 100644 index 0000000000..fa577fd533 --- /dev/null +++ b/meta/recipes-extended/libsolv/files/CVE-2021-3200.patch | |||
@@ -0,0 +1,82 @@ | |||
1 | From 0077ef29eb46d2e1df2f230fc95a1d9748d49dec Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Schroeder <mls@suse.de> | ||
3 | Date: Mon, 14 Dec 2020 11:12:00 +0100 | ||
4 | Subject: [PATCH] testcase_read: error out if repos are added or the system is | ||
5 | changed too late | ||
6 | |||
7 | We must not add new solvables after the considered map was created, the solver | ||
8 | was created, or jobs were added. We may not changed the system after jobs have | ||
9 | been added. | ||
10 | |||
11 | (Jobs may point inside the whatproviedes array, so we must not invalidate this | ||
12 | area.) | ||
13 | |||
14 | Upstream-Status: Backport [https://github.com/openSUSE/libsolv/commit/0077ef29eb46d2e1df2f230fc95a1d9748d49dec] | ||
15 | CVE: CVE-2021-3200 | ||
16 | CVE: CVE-2021-33928 | ||
17 | CVE: CVE-2021-33929 | ||
18 | CVE: CVE-2021-33930 | ||
19 | CVE: CVE-2021-33938 | ||
20 | CVE: CVE-2021-44568 | ||
21 | CVE: CVE-2021-44569 | ||
22 | CVE: CVE-2021-44570 | ||
23 | CVE: CVE-2021-44571 | ||
24 | CVE: CVE-2021-44573 | ||
25 | CVE: CVE-2021-44574 | ||
26 | CVE: CVE-2021-44575 | ||
27 | CVE: CVE-2021-44576 | ||
28 | CVE: CVE-2021-44577 | ||
29 | Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com> | ||
30 | |||
31 | Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> | ||
32 | Signed-off-by: Steve Sakoman <steve@sakoman.com> | ||
33 | --- | ||
34 | ext/testcase.c | 21 +++++++++++++++++++++ | ||
35 | 1 file changed, 21 insertions(+) | ||
36 | |||
37 | diff --git a/ext/testcase.c b/ext/testcase.c | ||
38 | index 0be7a213..8fb6d793 100644 | ||
39 | --- a/ext/testcase.c | ||
40 | +++ b/ext/testcase.c | ||
41 | @@ -1991,6 +1991,7 @@ testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **res | ||
42 | Id *genid = 0; | ||
43 | int ngenid = 0; | ||
44 | Queue autoinstq; | ||
45 | + int oldjobsize = job ? job->count : 0; | ||
46 | |||
47 | if (resultp) | ||
48 | *resultp = 0; | ||
49 | @@ -2065,6 +2066,21 @@ testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **res | ||
50 | int prio, subprio; | ||
51 | const char *rdata; | ||
52 | |||
53 | + if (pool->considered) | ||
54 | + { | ||
55 | + pool_error(pool, 0, "testcase_read: cannot add repos after packages were disabled"); | ||
56 | + continue; | ||
57 | + } | ||
58 | + if (solv) | ||
59 | + { | ||
60 | + pool_error(pool, 0, "testcase_read: cannot add repos after the solver was created"); | ||
61 | + continue; | ||
62 | + } | ||
63 | + if (job && job->count != oldjobsize) | ||
64 | + { | ||
65 | + pool_error(pool, 0, "testcase_read: cannot add repos after jobs have been created"); | ||
66 | + continue; | ||
67 | + } | ||
68 | prepared = 0; | ||
69 | if (!poolflagsreset) | ||
70 | { | ||
71 | @@ -2125,6 +2141,11 @@ testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **res | ||
72 | int i; | ||
73 | |||
74 | /* must set the disttype before the arch */ | ||
75 | + if (job && job->count != oldjobsize) | ||
76 | + { | ||
77 | + pool_error(pool, 0, "testcase_read: cannot change the system after jobs have been created"); | ||
78 | + continue; | ||
79 | + } | ||
80 | prepared = 0; | ||
81 | if (strcmp(pieces[2], "*") != 0) | ||
82 | { | ||