libvirt/libvirt-qemuDomainSetThrottleGroup-Enforce-non-zero-groupname-string-length.patch
Jiri Denemark db2f7c04f5 libvirt-11.10.0-4.el10
- qemuDomainSetThrottleGroup: Enforce non-zero 'groupname' string length (RHEL-141820)
- qemuDomainSetBlockIoTuneField: Move setting of 'group_name' out of the loop (RHEL-141820)
- qemuDomainSetThrottleGroup: Always honour thottle group name passed as argument (RHEL-141820)
- qemuDomainSetThrottleGroup: Don't put group name into the 'tunable' event twice (RHEL-141820)
- qemuSnapshotDiskHasBackingDisk: Avoid call of virStorageSourceIsSameLocation with NULL argument (RHEL-144089)
- qemuSnapshotUpdateBackingStore: Remove stale comment (RHEL-144089)
- qemuSnapshotDiskHasBackingDisk: Use proper 'max_depth' when calling 'virStorageSourceGetMetadata' (RHEL-144089)
- virDomainSnapshotDefAssignExternalNames: Improve error message (RHEL-144089)
- qemuSnapshotUpdateBackingStore: Retry as curent user if qemu-img fails (RHEL-144089)
- esx: Debug URL just before opening with curl (RHEL-138300)
- esx: Abstract all URL-creation code into one function (RHEL-138300)
- esx: Switch to creating URLs using virURIFormat (RHEL-138300)
- esx_util: Introduce esxUtil_EscapeInventoryObject() (RHEL-140196)
- esx: URI encode inventory objects twice (RHEL-140196)

Resolves: RHEL-138300, RHEL-140196, RHEL-141820, RHEL-144089
2026-01-29 16:15:49 +01:00

39 lines
1.3 KiB
Diff

From fee37458a1f93dc30a209ceeda1ec31847884fcf Mon Sep 17 00:00:00 2001
Message-ID: <fee37458a1f93dc30a209ceeda1ec31847884fcf.1769699749.git.jdenemar@redhat.com>
From: Peter Krempa <pkrempa@redhat.com>
Date: Fri, 16 Jan 2026 16:36:50 +0100
Subject: [PATCH] qemuDomainSetThrottleGroup: Enforce non-zero 'groupname'
string length
Having a name of 0 characters makes no sense. Reject it.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit abcdc9511b1c78df7dcdee9f01c6d55651d3a424)
https://issues.redhat.com/browse/RHEL-141820 [rhel-10.2]
https://issues.redhat.com/browse/RHEL-144010 [rhel-9.8]
---
src/qemu/qemu_driver.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f2e024dae3..194017a29a 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -20345,6 +20345,12 @@ qemuDomainSetThrottleGroup(virDomainPtr dom,
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
VIR_DOMAIN_AFFECT_CONFIG, -1);
+ if (strlen(groupname) == 0) {
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
+ _("'groupname' parameter string must have non-zero length"));
+ return -1;
+ }
+
if (qemuDomainValidateBlockIoTune(params, nparams) < 0)
return -1;
--
2.52.0