diff options
-rw-r--r-- | recipes-extended/libvirt/libvirt/CVE-2022-0897.patch | 57 | ||||
-rw-r--r-- | recipes-extended/libvirt/libvirt_6.1.0.bb | 1 |
2 files changed, 58 insertions, 0 deletions
diff --git a/recipes-extended/libvirt/libvirt/CVE-2022-0897.patch b/recipes-extended/libvirt/libvirt/CVE-2022-0897.patch new file mode 100644 index 00000000..81e3194c --- /dev/null +++ b/recipes-extended/libvirt/libvirt/CVE-2022-0897.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From 949548615761737bccc0046ae30b1b7cdf50ec39 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hitendra Prajapati <hprajapati@mvista.com> | ||
3 | Date: Mon, 27 Jun 2022 11:13:53 +0530 | ||
4 | Subject: [PATCH] CVE-2022-0897 | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Upstream-Status: Backport [https://gitlab.com/libvirt/libvirt/-/commit/a4947e8f63c3e6b7b067b444f3d6cf674c0d7f36] | ||
10 | CVE: CVE-2022-0897 | ||
11 | Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> | ||
12 | |||
13 | nwfilter: fix crash when counting number of network filters | ||
14 | |||
15 | The virNWFilterObjListNumOfNWFilters method iterates over the | ||
16 | driver->nwfilters, accessing virNWFilterObj instances. As such | ||
17 | it needs to be protected against concurrent modification of | ||
18 | the driver->nwfilters object. | ||
19 | |||
20 | This API allows unprivileged users to connect, so users with | ||
21 | read-only access to libvirt can cause a denial of service | ||
22 | crash if they are able to race with a call of virNWFilterUndefine. | ||
23 | Since network filters are usually statically defined, this is | ||
24 | considered a low severity problem. | ||
25 | |||
26 | This is assigned CVE-2022-0897. | ||
27 | Reviewed-by: Eric Blake's avatarEric Blake <eblake@redhat.com> | ||
28 | Signed-off-by: Daniel P. Berrangé's avatarDaniel P. Berrangé <berrange@redhat.com> | ||
29 | --- | ||
30 | src/nwfilter/nwfilter_driver.c | 8 ++++++-- | ||
31 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
32 | |||
33 | diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c | ||
34 | index 1c40772..27500d1 100644 | ||
35 | --- a/src/nwfilter/nwfilter_driver.c | ||
36 | +++ b/src/nwfilter/nwfilter_driver.c | ||
37 | @@ -514,11 +514,15 @@ nwfilterLookupByName(virConnectPtr conn, | ||
38 | static int | ||
39 | nwfilterConnectNumOfNWFilters(virConnectPtr conn) | ||
40 | { | ||
41 | + int ret; | ||
42 | if (virConnectNumOfNWFiltersEnsureACL(conn) < 0) | ||
43 | return -1; | ||
44 | |||
45 | - return virNWFilterObjListNumOfNWFilters(driver->nwfilters, conn, | ||
46 | - virConnectNumOfNWFiltersCheckACL); | ||
47 | + nwfilterDriverLock(); | ||
48 | + ret = virNWFilterObjListNumOfNWFilters(driver->nwfilters, conn, | ||
49 | + virConnectNumOfNWFiltersCheckACL); | ||
50 | + nwfilterDriverUnlock(); | ||
51 | + return ret; | ||
52 | } | ||
53 | |||
54 | |||
55 | -- | ||
56 | 2.25.1 | ||
57 | |||
diff --git a/recipes-extended/libvirt/libvirt_6.1.0.bb b/recipes-extended/libvirt/libvirt_6.1.0.bb index d0f2c315..97c1019c 100644 --- a/recipes-extended/libvirt/libvirt_6.1.0.bb +++ b/recipes-extended/libvirt/libvirt_6.1.0.bb | |||
@@ -47,6 +47,7 @@ SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \ | |||
47 | file://CVE-2020-25637_4.patch \ | 47 | file://CVE-2020-25637_4.patch \ |
48 | file://CVE-2021-3631.patch \ | 48 | file://CVE-2021-3631.patch \ |
49 | file://CVE-2021-3667.patch \ | 49 | file://CVE-2021-3667.patch \ |
50 | file://CVE-2022-0897.patch \ | ||
50 | " | 51 | " |
51 | SRC_URI[libvirt.md5sum] = "a870e63f20fac2ccf98e716d05256145" | 52 | SRC_URI[libvirt.md5sum] = "a870e63f20fac2ccf98e716d05256145" |
52 | SRC_URI[libvirt.sha256sum] = "167c185be45560e73dd3e14ed375778b555c01455192de2dafc4d0f74fabebc0" | 53 | SRC_URI[libvirt.sha256sum] = "167c185be45560e73dd3e14ed375778b555c01455192de2dafc4d0f74fabebc0" |