summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/libsolv/files/CVE-2021-3200.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/libsolv/files/CVE-2021-3200.patch')
-rw-r--r--meta/recipes-extended/libsolv/files/CVE-2021-3200.patch82
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 @@
1From 0077ef29eb46d2e1df2f230fc95a1d9748d49dec Mon Sep 17 00:00:00 2001
2From: Michael Schroeder <mls@suse.de>
3Date: Mon, 14 Dec 2020 11:12:00 +0100
4Subject: [PATCH] testcase_read: error out if repos are added or the system is
5 changed too late
6
7We must not add new solvables after the considered map was created, the solver
8was created, or jobs were added. We may not changed the system after jobs have
9been added.
10
11(Jobs may point inside the whatproviedes array, so we must not invalidate this
12area.)
13
14Upstream-Status: Backport [https://github.com/openSUSE/libsolv/commit/0077ef29eb46d2e1df2f230fc95a1d9748d49dec]
15CVE: CVE-2021-3200
16CVE: CVE-2021-33928
17CVE: CVE-2021-33929
18CVE: CVE-2021-33930
19CVE: CVE-2021-33938
20CVE: CVE-2021-44568
21CVE: CVE-2021-44569
22CVE: CVE-2021-44570
23CVE: CVE-2021-44571
24CVE: CVE-2021-44573
25CVE: CVE-2021-44574
26CVE: CVE-2021-44575
27CVE: CVE-2021-44576
28CVE: CVE-2021-44577
29Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
30
31Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
32Signed-off-by: Steve Sakoman <steve@sakoman.com>
33---
34 ext/testcase.c | 21 +++++++++++++++++++++
35 1 file changed, 21 insertions(+)
36
37diff --git a/ext/testcase.c b/ext/testcase.c
38index 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 {