public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libvirt] f44: CVE-2026-18917 (bz #2520165)
@ 2026-10-26 20:01 Cole Robinson
0 siblings, 0 replies; only message in thread
From: Cole Robinson @ 2026-10-26 20:01 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/libvirt
Branch : f44
Commit : 4e3a7c91129db0575a64a45afc16471e95c8cbd6
Author : Cole Robinson <crobinso@redhat.com>
Date : 2026-10-26T15:58:42-04:00
Stats : +180/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/libvirt/c/4e3a7c91129db0575a64a45afc16471e95c8cbd6?branch=f44
Log:
CVE-2026-18917 (bz #2520165)
Fix ceph pool start (bz #2529178)
---
diff --git a/0001-remote-Fix-integer-overflow-in-RPC-handler-for-virNo.patch b/0001-remote-Fix-integer-overflow-in-RPC-handler-for-virNo.patch
new file mode 100644
index 0000000..82f9a81
--- /dev/null
+++ b/0001-remote-Fix-integer-overflow-in-RPC-handler-for-virNo.patch
@@ -0,0 +1,67 @@
+From b2ea1ef7240dd5e3ab77c549214a08d935fec337 Mon Sep 17 00:00:00 2001
+Message-ID: <b2ea1ef7240dd5e3ab77c549214a08d935fec337.1793044199.git.crobinso@redhat.com>
+From: Peter Krempa <pkrempa@redhat.com>
+Date: Wed, 12 Aug 2026 16:51:58 +0200
+Subject: [PATCH] remote: Fix integer overflow in RPC handler for
+ virNodeGetFreePages (CVE-2026-18917)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CVE-2026-18917
+
+The RPC handler 'remoteDispatchNodeGetFreePages' multiplies the 'npages'
+argument with the 'cellcount' argument passed to 'virNodeGetFreePages',
+both of which are declared as 'unsigned int' to both do an RPC limit
+check against the 'REMOTE_NODE_MAX_CELLS' constant and then to allocate
+the memory to hold the result from the actual hypervisor driver.
+
+Since both the values are 'unsigned int' the product is also unsigned
+int so big enough numbers can overflow, both passing the check and also
+allocating not enough memory for the result. The hypervisor driver
+assumes that the passed buffer is large enough and overwrites memory.
+
+When this happens the the hypervisor daemon crashes.
+
+This can be triggered e.g. by passing 1023 and 4198405 as values which
+multiply to 1019 after wrapping to 32 bit unsigned value.
+
+Use the VIR_INT_MULTIPLY_OVERFLOW macro in the check to avoid the issue
+the same way as we do for other APIs doing multiplication of arguments
+to determine amount of required memory.
+
+Fixes: 34f2d0319d2098c77c8cc27d8350616029125a2b (v1.2.5-164-g34f2d0319d)
+Closes: https://gitlab.com/libvirt/libvirt/-/work_items/903
+Signed-off-by: Peter Krempa <pkrempa@redhat.com>
+Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
+Signed-off-by: Cole Robinson <crobinso@redhat.com>
+---
+ src/remote/remote_daemon_dispatch.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c
+index 95ab173b7c..e548438250 100644
+--- a/src/remote/remote_daemon_dispatch.c
++++ b/src/remote/remote_daemon_dispatch.c
+@@ -6752,13 +6752,14 @@ remoteDispatchNodeGetFreePages(virNetServer *server G_GNUC_UNUSED,
+ if (!conn)
+ goto cleanup;
+
+- if (args->pages.pages_len * args->cellCount > REMOTE_NODE_MAX_CELLS) {
+- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+- _("the result won't fit into REMOTE_NODE_MAX_CELLS"));
++ if (VIR_INT_MULTIPLY_OVERFLOW(args->pages.pages_len, args->cellCount) ||
++ args->pages.pages_len * args->cellCount > REMOTE_NODE_MAX_CELLS) {
++ virReportError(VIR_ERR_INTERNAL_ERROR,
++ _("npages * cellcount > REMOTE_NODE_MAX_CELLS (%1$u)"),
++ REMOTE_NODE_MAX_CELLS);
+ goto cleanup;
+ }
+
+- /* Allocate return buffer. */
+ ret->counts.counts_val = g_new0(uint64_t,
+ args->pages.pages_len * args->cellCount);
+
+--
+2.56.0
+
diff --git a/0001-replace-rbd-option-auth_supported-with-auth_-_requir.patch b/0001-replace-rbd-option-auth_supported-with-auth_-_requir.patch
new file mode 100644
index 0000000..4b16ea9
--- /dev/null
+++ b/0001-replace-rbd-option-auth_supported-with-auth_-_requir.patch
@@ -0,0 +1,104 @@
+From 3af8cc51d5f596866cf971b750a0546c0205cf02 Mon Sep 17 00:00:00 2001
+Message-ID: <3af8cc51d5f596866cf971b750a0546c0205cf02.1793044449.git.crobinso@redhat.com>
+From: Janis Heims <janis.heims@undertheprinter.com>
+Date: Tue, 13 Oct 2026 22:39:42 +0200
+Subject: [PATCH] replace rbd option auth_supported with auth_*_required
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+As stated in Yusuke Fujimaki's patch, Ceph recently removed the
+deprecated auth_supported option that is still used by libvirt, causing
+errors when attempting to start a storage pool on a newer Ceph server:
+https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/RELDVG6A3LAA4IFA32EOFQ5OJPMI6OGR/
+https://github.com/ceph/ceph/commit/350cc71d7d9e9cd6239d24080082de7ac9bf8b70
+
+This patch addresses the issue by replacing the deprecated option with
+auth_client_required. While all three replacement options
+(auth_cluster_required, auth_service_required and auth_client_required)
+were previously set by Ceph, it really only makes sense to keep the last
+in libvirt as the other options are only relevant on the server side.
+See the discussion here:
+https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/3TVM5DVH3MOIQAM6ZUS5TYBLNSA6UA7K/
+
+Resolves: https://gitlab.com/libvirt/libvirt/-/work_items/918
+
+Signed-off-by: Janis Heims <janis.heims@undertheprinter.com>
+Reviewed-by: Ján Tomko <jtomko@redhat.com>
+Signed-off-by: Cole Robinson <crobinso@redhat.com>
+---
+ src/libxl/libxl_conf.c | 7 +++----
+ src/libxl/xen_xl.c | 2 +-
+ src/storage/storage_backend_rbd.c | 5 +++--
+ tests/xlconfigdata/test-rbd-multihost-noauth.cfg | 2 +-
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
+index 3bb5c1e591..9050caf400 100644
+--- a/src/libxl/libxl_conf.c
++++ b/src/libxl/libxl_conf.c
+@@ -1087,11 +1087,10 @@ libxlMakeNetworkDiskSrcStr(virStorageSource *src,
+
+ if (username) {
+ virBufferEscape(&buf, '\\', ":", ":id=%s", username);
+- virBufferEscape(&buf, '\\', ":",
+- ":key=%s:auth_supported=cephx\\;none",
+- secret);
++ virBufferEscape(&buf, '\\', ":", ":key=%s", secret);
++ virBufferAddLit(&buf, ":auth_client_required=cephx\\;none");
+ } else {
+- virBufferAddLit(&buf, ":auth_supported=none");
++ virBufferAddLit(&buf, ":auth_client_required=none");
+ }
+
+ if (src->nhosts > 0) {
+diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c
+index d05972af5b..5a31fc6939 100644
+--- a/src/libxl/xen_xl.c
++++ b/src/libxl/xen_xl.c
+@@ -1478,7 +1478,7 @@ xenFormatXLDiskSrcNet(virStorageSource *src)
+
+ virBufferStrcat(&buf, "rbd:", src->path, NULL);
+
+- virBufferAddLit(&buf, ":auth_supported=none");
++ virBufferAddLit(&buf, ":auth_client_required=none");
+
+ if (src->nhosts > 0) {
+ virBufferAddLit(&buf, ":mon_host=");
+diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backend_rbd.c
+index 25cad4a28d..9832a99264 100644
+--- a/src/storage/storage_backend_rbd.c
++++ b/src/storage/storage_backend_rbd.c
+@@ -241,7 +241,7 @@ virStorageBackendRBDOpenRADOSConn(virStorageBackendRBDState *ptr,
+ goto cleanup;
+
+ if (virStorageBackendRBDRADOSConfSet(ptr->cluster,
+- "auth_supported", "cephx") < 0)
++ "auth_client_required", "cephx") < 0)
+ goto cleanup;
+ } else {
+ VIR_DEBUG("Not using cephx authorization");
+@@ -250,8 +250,9 @@ virStorageBackendRBDOpenRADOSConn(virStorageBackendRBDState *ptr,
+ _("failed to create the RADOS cluster"));
+ goto cleanup;
+ }
++
+ if (virStorageBackendRBDRADOSConfSet(ptr->cluster,
+- "auth_supported", "none") < 0)
++ "auth_client_required", "none") < 0)
+ goto cleanup;
+ }
+
+diff --git a/tests/xlconfigdata/test-rbd-multihost-noauth.cfg b/tests/xlconfigdata/test-rbd-multihost-noauth.cfg
+index 5906865047..8ff1878885 100644
+--- a/tests/xlconfigdata/test-rbd-multihost-noauth.cfg
++++ b/tests/xlconfigdata/test-rbd-multihost-noauth.cfg
+@@ -22,4 +22,4 @@ parallel = "none"
+ serial = "none"
+ builder = "hvm"
+ boot = "d"
+-disk = [ "format=raw,vdev=hda,access=rw,backendtype=phy,target=/dev/HostVG/XenGuest2", "format=raw,vdev=hdb,access=rw,backendtype=qdisk,target=rbd:pool/image:auth_supported=none:mon_host=mon1.example.org\\:6321\\;mon2.example.org\\:6322\\;mon3.example.org\\:6322" ]
++disk = [ "format=raw,vdev=hda,access=rw,backendtype=phy,target=/dev/HostVG/XenGuest2", "format=raw,vdev=hdb,access=rw,backendtype=qdisk,target=rbd:pool/image:auth_client_required=none:mon_host=mon1.example.org\\:6321\\;mon2.example.org\\:6322\\;mon3.example.org\\:6322" ]
+--
+2.56.0
+
diff --git a/libvirt.spec b/libvirt.spec
index 687be21..7251f1c 100644
--- a/libvirt.spec
+++ b/libvirt.spec
@@ -295,7 +295,7 @@
Summary: Library providing a simple virtualization API
Name: libvirt
Version: 12.0.0
-Release: 5%{?dist}
+Release: 6%{?dist}
License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1
URL: https://libvirt.org/
@@ -309,6 +309,10 @@ Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz
Patch: 0001-esx-Allow-connecting-to-IPv6-server.patch
# Fix systemtap types
Patch: 0001-scripts-avoid-matching-char-as-string-for-systemtap.patch
+# CVE-2026-18917 (bz #2520165)
+Patch: 0001-remote-Fix-integer-overflow-in-RPC-handler-for-virNo.patch
+# Fix ceph pool start (bz #2529178)
+Patch: 0001-replace-rbd-option-auth_supported-with-auth_-_requir.patch
Requires: libvirt-daemon = %{version}-%{release}
Requires: libvirt-daemon-config-network = %{version}-%{release}
@@ -2697,6 +2701,10 @@ exit 0
%changelog
+* Mon Oct 26 2026 Cole Robinson <crobinso@redhat.com> - 12.0.0-6
+- CVE-2026-18917 (bz #2520165)
+- Fix ceph pool start (bz #2529178)
+
* Wed Sep 30 2026 Daniel P. Berrangé <berrange@redhat.com> - 12.0.0-5
- Backport fix for systemtap probes (rhbz#2432568)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-26 20:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26 20:01 [rpms/libvirt] f44: CVE-2026-18917 (bz #2520165) Cole Robinson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox