diff options
| -rw-r--r-- | recipes-extended/libvirt/libvirt-python.inc | 3 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt/0001-docs-Fix-template-matching-in-page.xsl.patch | 64 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt/0001-security-fix-SELinux-label-generation-logic.patch | 56 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt/0001-storage_driver-Unlock-object-on-ACL-fail-in-storageP.patch | 40 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt/0002-meson-Fix-compatibility-with-Meson-0.58.patch | 48 | ||||
| -rw-r--r-- | recipes-extended/libvirt/libvirt_8.1.0.bb (renamed from recipes-extended/libvirt/libvirt_7.2.0.bb) | 11 | 
6 files changed, 4 insertions, 218 deletions
| diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc index a48aaea5..6e2c3677 100644 --- a/recipes-extended/libvirt/libvirt-python.inc +++ b/recipes-extended/libvirt/libvirt-python.inc | |||
| @@ -17,8 +17,7 @@ FILES:${PN}-python = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*" | |||
| 17 | 17 | ||
| 18 | SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python" | 18 | SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python" | 
| 19 | 19 | ||
| 20 | SRC_URI[libvirt_python.md5sum] = "19bf22414a43d358581b9259b52047a7" | 20 | SRC_URI[libvirt_python.sha256sum] = "a21ecfab6d29ac1bdd1bfd4aa3ef58447f9f70919aefecd03774613f65914e43" | 
| 21 | SRC_URI[libvirt_python.sha256sum] = "c0c3bac54c55622e17927b09cd9843869600d71842fb072c99491fe2608dcee7" | ||
| 22 | 21 | ||
| 23 | export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" | 22 | export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" | 
| 24 | export LIBVIRT_CFLAGS = "-I${S}/include" | 23 | export LIBVIRT_CFLAGS = "-I${S}/include" | 
| diff --git a/recipes-extended/libvirt/libvirt/0001-docs-Fix-template-matching-in-page.xsl.patch b/recipes-extended/libvirt/libvirt/0001-docs-Fix-template-matching-in-page.xsl.patch deleted file mode 100644 index 9dd650ee..00000000 --- a/recipes-extended/libvirt/libvirt/0001-docs-Fix-template-matching-in-page.xsl.patch +++ /dev/null | |||
| @@ -1,64 +0,0 @@ | |||
| 1 | Upstream-Status: Backport | ||
| 2 | |||
| 3 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
| 4 | |||
| 5 | From 54814c87f3706cc8eb894634ebef0f9cf7dabae6 Mon Sep 17 00:00:00 2001 | ||
| 6 | From: Martin Kletzander <mkletzan@redhat.com> | ||
| 7 | Date: Mon, 21 Feb 2022 09:26:13 +0100 | ||
| 8 | Subject: [PATCH] docs: Fix template matching in page.xsl | ||
| 9 | |||
| 10 | Our last default template had a match of "node()" which incidentally matched | ||
| 11 | everything, including text nodes. Since this has the same priority according to | ||
| 12 | the XSLT spec, section 5.5: | ||
| 13 | |||
| 14 | https://www.w3.org/TR/1999/REC-xslt-19991116#conflict | ||
| 15 | |||
| 16 | this is an error. Also according to the same spec section, the XSLT processor | ||
| 17 | may signal the error or pick the last rule. | ||
| 18 | |||
| 19 | This was uncovered with libxslt 1.1.35 which contains the following commit: | ||
| 20 | |||
| 21 | https://gitlab.gnome.org/GNOME/libxslt/-/commit/b0074eeca3c6b21b4da14fdf712b853900c51635 | ||
| 22 | |||
| 23 | which makes the build fail with: | ||
| 24 | |||
| 25 | runtime error: file ../docs/page.xsl line 223 element element | ||
| 26 | xsl:element: The effective name '' is not a valid QName. | ||
| 27 | |||
| 28 | because our last rule also matches text nodes and we are trying to extract the | ||
| 29 | node name out of them. | ||
| 30 | |||
| 31 | To fix this we change the match to "*" which only matches elements and not all | ||
| 32 | the nodes, and to avoid any possible errors with different XSLT processors we | ||
| 33 | also bump the priority of the match="text()" rule a little higher, just in case | ||
| 34 | someone needs to use an XSLT processor that chooses signalling the error instead | ||
| 35 | of the optional recovery. | ||
| 36 | |||
| 37 | https://bugs.gentoo.org/833586 | ||
| 38 | |||
| 39 | Signed-off-by: Martin Kletzander <mkletzan@redhat.com> | ||
| 40 | --- | ||
| 41 | docs/page.xsl | 4 ++-- | ||
| 42 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 43 | |||
| 44 | diff --git a/docs/page.xsl b/docs/page.xsl | ||
| 45 | index fd67918d3b..72a6fa0842 100644 | ||
| 46 | --- a/docs/page.xsl | ||
| 47 | +++ b/docs/page.xsl | ||
| 48 | @@ -215,11 +215,11 @@ | ||
| 49 | </xsl:element> | ||
| 50 | </xsl:template> | ||
| 51 | |||
| 52 | - <xsl:template match="text()" mode="copy"> | ||
| 53 | + <xsl:template match="text()" mode="copy" priority="0"> | ||
| 54 | <xsl:value-of select="."/> | ||
| 55 | </xsl:template> | ||
| 56 | |||
| 57 | - <xsl:template match="node()" mode="copy"> | ||
| 58 | + <xsl:template match="*" mode="copy"> | ||
| 59 | <xsl:element name="{name()}"> | ||
| 60 | <xsl:copy-of select="./@*"/> | ||
| 61 | <xsl:apply-templates mode="copy" /> | ||
| 62 | -- | ||
| 63 | 2.33.0 | ||
| 64 | |||
| diff --git a/recipes-extended/libvirt/libvirt/0001-security-fix-SELinux-label-generation-logic.patch b/recipes-extended/libvirt/libvirt/0001-security-fix-SELinux-label-generation-logic.patch deleted file mode 100644 index 2753503d..00000000 --- a/recipes-extended/libvirt/libvirt/0001-security-fix-SELinux-label-generation-logic.patch +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | From 15073504dbb624d3f6c911e85557019d3620fdb2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com> | ||
| 3 | Date: Mon, 28 Jun 2021 13:09:04 +0100 | ||
| 4 | Subject: [PATCH] security: fix SELinux label generation logic | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | A process can access a file if the set of MCS categories | ||
| 10 | for the file is equal-to *or* a subset-of, the set of | ||
| 11 | MCS categories for the process. | ||
| 12 | |||
| 13 | If there are two VMs: | ||
| 14 | |||
| 15 | a) svirt_t:s0:c117 | ||
| 16 | b) svirt_t:s0:c117,c720 | ||
| 17 | |||
| 18 | Then VM (b) is able to access files labelled for VM (a). | ||
| 19 | |||
| 20 | IOW, we must discard case where the categories are equal | ||
| 21 | because that is a subset of many other valid category pairs. | ||
| 22 | |||
| 23 | Upstream-status: Backport | ||
| 24 | |||
| 25 | Fixes: https://gitlab.com/libvirt/libvirt/-/issues/153 | ||
| 26 | CVE-2021-3631 | ||
| 27 | Reviewed-by: Peter Krempa <pkrempa@redhat.com> | ||
| 28 | Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> | ||
| 29 | --- | ||
| 30 | src/security/security_selinux.c | 10 +++++++++- | ||
| 31 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
| 32 | |||
| 33 | diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c | ||
| 34 | index b50f4463cc..0c2cf1d1c7 100644 | ||
| 35 | --- a/src/security/security_selinux.c | ||
| 36 | +++ b/src/security/security_selinux.c | ||
| 37 | @@ -383,7 +383,15 @@ virSecuritySELinuxMCSFind(virSecurityManager *mgr, | ||
| 38 | VIR_DEBUG("Try cat %s:c%d,c%d", sens, c1 + catMin, c2 + catMin); | ||
| 39 | |||
| 40 | if (c1 == c2) { | ||
| 41 | - mcs = g_strdup_printf("%s:c%d", sens, catMin + c1); | ||
| 42 | + /* | ||
| 43 | + * A process can access a file if the set of MCS categories | ||
| 44 | + * for the file is equal-to *or* a subset-of, the set of | ||
| 45 | + * MCS categories for the process. | ||
| 46 | + * | ||
| 47 | + * IOW, we must discard case where the categories are equal | ||
| 48 | + * because that is a subset of other category pairs. | ||
| 49 | + */ | ||
| 50 | + continue; | ||
| 51 | } else { | ||
| 52 | if (c1 > c2) { | ||
| 53 | int t = c1; | ||
| 54 | -- | ||
| 55 | 2.17.1 | ||
| 56 | |||
| diff --git a/recipes-extended/libvirt/libvirt/0001-storage_driver-Unlock-object-on-ACL-fail-in-storageP.patch b/recipes-extended/libvirt/libvirt/0001-storage_driver-Unlock-object-on-ACL-fail-in-storageP.patch deleted file mode 100644 index 608322d9..00000000 --- a/recipes-extended/libvirt/libvirt/0001-storage_driver-Unlock-object-on-ACL-fail-in-storageP.patch +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | From d3e20e186ed531e196bb1529430f39b0c917e6dc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Peter Krempa <pkrempa@redhat.com> | ||
| 3 | Date: Wed, 21 Jul 2021 11:22:25 +0200 | ||
| 4 | Subject: [PATCH] storage_driver: Unlock object on ACL fail in | ||
| 5 | storagePoolLookupByTargetPath | ||
| 6 | |||
| 7 | 'virStoragePoolObjListSearch' returns a locked and refed object, thus we | ||
| 8 | must release it on ACL permission failure. | ||
| 9 | |||
| 10 | Fixes: 7aa0e8c0cb8 | ||
| 11 | Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318 | ||
| 12 | Signed-off-by: Peter Krempa <pkrempa@redhat.com> | ||
| 13 | Reviewed-by: Michal Privoznik <mprivozn@redhat.com> | ||
| 14 | |||
| 15 | Upstream-status: Backport | ||
| 16 | CVE-2021-3667 [https://bugzilla.redhat.com/show_bug.cgi?id=1986094] | ||
| 17 | Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com> | ||
| 18 | --- | ||
| 19 | src/storage/storage_driver.c | 4 +++- | ||
| 20 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
| 21 | |||
| 22 | diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c | ||
| 23 | index ecb5b86b4f..de66f1f9e5 100644 | ||
| 24 | --- a/src/storage/storage_driver.c | ||
| 25 | +++ b/src/storage/storage_driver.c | ||
| 26 | @@ -1739,8 +1739,10 @@ storagePoolLookupByTargetPath(virConnectPtr conn, | ||
| 27 | storagePoolLookupByTargetPathCallback, | ||
| 28 | cleanpath))) { | ||
| 29 | def = virStoragePoolObjGetDef(obj); | ||
| 30 | - if (virStoragePoolLookupByTargetPathEnsureACL(conn, def) < 0) | ||
| 31 | + if (virStoragePoolLookupByTargetPathEnsureACL(conn, def) < 0) { | ||
| 32 | + virStoragePoolObjEndAPI(&obj); | ||
| 33 | return NULL; | ||
| 34 | + } | ||
| 35 | |||
| 36 | pool = virGetStoragePool(conn, def->name, def->uuid, NULL, NULL); | ||
| 37 | virStoragePoolObjEndAPI(&obj); | ||
| 38 | -- | ||
| 39 | 2.27.0 | ||
| 40 | |||
| diff --git a/recipes-extended/libvirt/libvirt/0002-meson-Fix-compatibility-with-Meson-0.58.patch b/recipes-extended/libvirt/libvirt/0002-meson-Fix-compatibility-with-Meson-0.58.patch deleted file mode 100644 index 3201eede..00000000 --- a/recipes-extended/libvirt/libvirt/0002-meson-Fix-compatibility-with-Meson-0.58.patch +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | From c607266619c5ab78ad5d4179b3ea93cfb6348391 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andrea Bolognani <abologna@redhat.com> | ||
| 3 | Date: Mon, 3 May 2021 09:06:34 +0200 | ||
| 4 | Subject: [PATCH] meson: Fix compatibility with Meson 0.58 | ||
| 5 | |||
| 6 | Builds failed with | ||
| 7 | |||
| 8 | tests/meson.build:690:0: ERROR: List item must be one | ||
| 9 | of <class 'str'>, not <class 'list'> | ||
| 10 | |||
| 11 | before this change. | ||
| 12 | |||
| 13 | https://gitlab.com/libvirt/libvirt/-/issues/158 | ||
| 14 | |||
| 15 | Upstream-Status: Backport [https://gitlab.com/libvirt/libvirt/-/commit/c607266619c5ab78ad5d4179b3ea93cfb6348391] | ||
| 16 | |||
| 17 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 18 | Signed-off-by: Andrea Bolognani <abologna@redhat.com> | ||
| 19 | Reviewed-by: Peter Krempa <pkrempa@redhat.com> | ||
| 20 | Reviewed-by: Pavel Hrdina <phrdina@redhat.com> | ||
| 21 | --- | ||
| 22 | tests/meson.build | 8 ++++---- | ||
| 23 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/tests/meson.build b/tests/meson.build | ||
| 26 | index 05c3e90195..9900983d0c 100644 | ||
| 27 | --- a/tests/meson.build | ||
| 28 | +++ b/tests/meson.build | ||
| 29 | @@ -687,12 +687,12 @@ foreach name : test_scripts | ||
| 30 | test(name, script, env: tests_env) | ||
| 31 | endforeach | ||
| 32 | |||
| 33 | +testenv = runutf8 | ||
| 34 | +testenv += 'VIR_TEST_FILE_ACCESS=1' | ||
| 35 | + | ||
| 36 | add_test_setup( | ||
| 37 | 'access', | ||
| 38 | - env: [ | ||
| 39 | - 'VIR_TEST_FILE_ACCESS=1', | ||
| 40 | - runutf8, | ||
| 41 | - ], | ||
| 42 | + env: testenv, | ||
| 43 | exe_wrapper: [ python3_prog, check_file_access_prog.path() ], | ||
| 44 | ) | ||
| 45 | |||
| 46 | -- | ||
| 47 | GitLab | ||
| 48 | |||
| diff --git a/recipes-extended/libvirt/libvirt_7.2.0.bb b/recipes-extended/libvirt/libvirt_8.1.0.bb index 1fc55b8d..b90fb704 100644 --- a/recipes-extended/libvirt/libvirt_7.2.0.bb +++ b/recipes-extended/libvirt/libvirt_8.1.0.bb | |||
| @@ -28,14 +28,9 @@ SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \ | |||
| 28 | file://dnsmasq.conf \ | 28 | file://dnsmasq.conf \ | 
| 29 | file://hook_support.py \ | 29 | file://hook_support.py \ | 
| 30 | file://gnutls-helper.py \ | 30 | file://gnutls-helper.py \ | 
| 31 | file://0002-meson-Fix-compatibility-with-Meson-0.58.patch \ | ||
| 32 | file://0001-security-fix-SELinux-label-generation-logic.patch \ | ||
| 33 | file://0001-storage_driver-Unlock-object-on-ACL-fail-in-storageP.patch \ | ||
| 34 | file://0001-docs-Fix-template-matching-in-page.xsl.patch \ | ||
| 35 | " | 31 | " | 
| 36 | 32 | ||
| 37 | SRC_URI[libvirt.md5sum] = "92044b629216e44adce63224970a54a3" | 33 | SRC_URI[libvirt.sha256sum] = "3c6c43becffeb34a3f397c616206aa69a893ff8bf5e8208393c84e8e75352934" | 
| 38 | SRC_URI[libvirt.sha256sum] = "01f459d0c7ba5009622a628dba1a026200e8f4a299fea783b936a71d7e0ed1d0" | ||
| 39 | 34 | ||
| 40 | inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative | 35 | inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative | 
| 41 | USERADD_PACKAGES = "${PN}" | 36 | USERADD_PACKAGES = "${PN}" | 
| @@ -160,7 +155,7 @@ PACKAGECONFIG[fuse] = "-Dfuse=enabled,-Dfuse=disabled,fuse," | |||
| 160 | PACKAGECONFIG[audit] = "-Daudit=enabled,-Daudit=disabled,audit," | 155 | PACKAGECONFIG[audit] = "-Daudit=enabled,-Daudit=disabled,audit," | 
| 161 | PACKAGECONFIG[libcap-ng] = "-Dcapng=enabled,-Dcapng=disabled,libcap-ng," | 156 | PACKAGECONFIG[libcap-ng] = "-Dcapng=enabled,-Dcapng=disabled,libcap-ng," | 
| 162 | PACKAGECONFIG[wireshark] = "-Dwireshark_dissector=enabled,-Dwireshark_dissector=disabled,wireshark libwsutil," | 157 | PACKAGECONFIG[wireshark] = "-Dwireshark_dissector=enabled,-Dwireshark_dissector=disabled,wireshark libwsutil," | 
| 163 | PACKAGECONFIG[apparmor_profiles] = "-Dapparmor_profiles=true, -Dapparmor_profiles=false," | 158 | PACKAGECONFIG[apparmor_profiles] = "-Dapparmor_profiles=enabled, -Dapparmor_profiles=disabled," | 
| 164 | PACKAGECONFIG[firewalld] = "-Dfirewalld=enabled, -Dfirewalld=disabled," | 159 | PACKAGECONFIG[firewalld] = "-Dfirewalld=enabled, -Dfirewalld=disabled," | 
| 165 | PACKAGECONFIG[libpcap] = "-Dlibpcap=enabled, -Dlibpcap=disabled,libpcap,libpcap" | 160 | PACKAGECONFIG[libpcap] = "-Dlibpcap=enabled, -Dlibpcap=disabled,libpcap,libpcap" | 
| 166 | PACKAGECONFIG[numad] = "-Dnumad=enabled, -Dnumad=disabled," | 161 | PACKAGECONFIG[numad] = "-Dnumad=enabled, -Dnumad=disabled," | 
| @@ -212,7 +207,7 @@ do_install:append() { | |||
| 212 | fi | 207 | fi | 
| 213 | 208 | ||
| 214 | # This variable is used by libvirtd.service to start libvirtd in the right mode | 209 | # This variable is used by libvirtd.service to start libvirtd in the right mode | 
| 215 | sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/sysconfig/libvirtd | 210 | sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/init.d/libvirtd | 
| 216 | 211 | ||
| 217 | # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities. | 212 | # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities. | 
| 218 | sed -i -e 's/Type=notify/Type=forking/' \ | 213 | sed -i -e 's/Type=notify/Type=forking/' \ | 
