From da598118cf5eff3b74be9b05da9f536cf8758258 Mon Sep 17 00:00:00 2001 From: Daniel P. Berrangé Date: Mar 03 2022 17:54:17 +0000 Subject: Fix crash undefining VM without loader (rhbz#2060412) Signed-off-by: Daniel P. Berrangé --- diff --git a/0001-qemu-segmentation-fault-in-virtqemud-executing-qemuD.patch b/0001-qemu-segmentation-fault-in-virtqemud-executing-qemuD.patch new file mode 100644 index 0000000..1dc69aa --- /dev/null +++ b/0001-qemu-segmentation-fault-in-virtqemud-executing-qemuD.patch @@ -0,0 +1,48 @@ +From 823a62ec8aac4fb75e6e281164f3eb56ae47597c Mon Sep 17 00:00:00 2001 +From: Boris Fiuczynski +Date: Tue, 1 Mar 2022 18:47:59 +0100 +Subject: [PATCH] qemu: segmentation fault in virtqemud executing + qemuDomainUndefineFlags + +Commit 5adfb3472342741c443ac91dee0abb18b5a3d038 causes a segmentation fault. + +Stack trace of thread 664419: + #0 0x000003ff62ec553c in qemuDomainUndefineFlags (dom=0x3ff6c002810, flags=) at ../src/qemu/qemu_driver.c:6618 + #1 0x000003ff876a7e5c in virDomainUndefineFlags (domain=domain@entry=0x3ff6c002810, flags=) at ../src/libvirt-domain.c:6519 + #2 0x000002aa2b64a808 in remoteDispatchDomainUndefineFlags (server=0x2aa2c3d7880, msg=0x2aa2c3d2770, args=, rerr=0x3ff8287b950, client=) + at src/remote/remote_daemon_dispatch_stubs.h:13080 + #3 remoteDispatchDomainUndefineFlagsHelper (server=0x2aa2c3d7880, client=, msg=0x2aa2c3d2770, rerr=0x3ff8287b950, args=, ret=0x0) + at src/remote/remote_daemon_dispatch_stubs.h:13059 + #4 0x000003ff8758bbf4 in virNetServerProgramDispatchCall (msg=0x2aa2c3d2770, client=0x2aa2c3e3050, server=0x2aa2c3d7880, prog=0x2aa2c3d8010) + at ../src/rpc/virnetserverprogram.c:428 + #5 virNetServerProgramDispatch (prog=0x2aa2c3d8010, server=server@entry=0x2aa2c3d7880, client=0x2aa2c3e3050, msg=0x2aa2c3d2770) at ../src/rpc/virnetserverprogram.c:302 + #6 0x000003ff8758c260 in virNetServerProcessMsg (msg=, prog=, client=, srv=0x2aa2c3d7880) at ../src/rpc/virnetserver.c:140 + #7 virNetServerHandleJob (jobOpaque=0x2aa2c3e2d30, opaque=0x2aa2c3d7880) at ../src/rpc/virnetserver.c:160 + #8 0x000003ff874c49aa in virThreadPoolWorker (opaque=) at ../src/util/virthreadpool.c:164 + #9 0x000003ff874c3f62 in virThreadHelper (data=) at ../src/util/virthread.c:256 + #10 0x000003ff86c1cf8c in start_thread () from /lib64/libc.so.6 + #11 0x000003ff86c9650e in thread_start () from /lib64/libc.so.6 + +Signed-off-by: Boris Fiuczynski +Reviewed-by: Jim Fehlig +Reviewed-by: Michal Privoznik +--- + src/qemu/qemu_driver.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c +index bcd9bdb436..8337eed510 100644 +--- a/src/qemu/qemu_driver.c ++++ b/src/qemu/qemu_driver.c +@@ -6615,7 +6615,7 @@ qemuDomainUndefineFlags(virDomainPtr dom, + } + } + +- if (vm->def->os.loader->nvram) { ++ if (vm->def->os.loader && vm->def->os.loader->nvram) { + nvram_path = g_strdup(vm->def->os.loader->nvram); + } else if (vm->def->os.firmware == VIR_DOMAIN_OS_DEF_FIRMWARE_EFI) { + qemuDomainNVRAMPathFormat(cfg, vm->def, &nvram_path); +-- +2.34.1 + diff --git a/libvirt.spec b/libvirt.spec index 514e1ab..2c05fa2 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -228,7 +228,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 8.1.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ URL: https://libvirt.org/ @@ -236,6 +236,7 @@ URL: https://libvirt.org/ %define mainturl stable_updates/ %endif Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz +Patch: 0001-qemu-segmentation-fault-in-virtqemud-executing-qemuD.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -2124,6 +2125,9 @@ exit 0 %changelog +* Thu Mar 3 2022 Daniel P. Berrangé - 8.1.0-2 +- Fix crash undefining VM without loader (rhbz#2060412) + * Tue Mar 01 2022 Cole Robinson - 8.1.0-1 - Update to version 8.1.0