Accepting request 955937 from Virtualization

- libxl: Fix libvirtd crash on domain restore
  454b927d-libxl-fix-dom-restore.patch
  bsc#1196115

OBS-URL: https://build.opensuse.org/request/show/955937
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=349
This commit is contained in:
Dominique Leuenberger 2022-02-21 16:45:56 +00:00 committed by Git OBS Bridge
commit e1a856955d
3 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,27 @@
commit 454b927d1e33a1fe9dca535db2c97300fdae62cc
Author: Jim Fehlig <jfehlig@suse.com>
Date: Thu Feb 17 11:48:13 2022 -0700
libxl: Fix libvirtd crash on domain restore
Commit cc2a3c2a94 missed one case in the libxl driver where virDomainDef
is returned from libxlDomainSaveImageOpen and a g_steal_pointer is needed.
Without it, the virDomainDef object is freed and the driver crashes later
in the restore process when accessing the object.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Index: libvirt-8.0.0/src/libxl/libxl_domain.c
===================================================================
--- libvirt-8.0.0.orig/src/libxl/libxl_domain.c
+++ libvirt-8.0.0/src/libxl/libxl_domain.c
@@ -811,7 +811,7 @@ libxlDomainSaveImageOpen(libxlDriverPriv
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
goto error;
- *ret_def = def;
+ *ret_def = g_steal_pointer(&def);
*ret_hdr = hdr;
return fd;

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Feb 18 18:25:46 UTC 2022 - James Fehlig <jfehlig@suse.com>
- libxl: Fix libvirtd crash on domain restore
454b927d-libxl-fix-dom-restore.patch
bsc#1196115
-------------------------------------------------------------------
Tue Feb 8 22:25:03 UTC 2022 - James Fehlig <jfehlig@suse.com>

View File

@ -309,6 +309,7 @@ Patch4: 105dace2-revert-virProcessGetStatInfo.patch
Patch5: e0241f33-libxl-mark-allocated-graphics-ports.patch
Patch6: 18ec405a-libxl-release-graphics-ports.patch
Patch7: 76deb656-qemu-fix-snapshot-revert.patch
Patch8: 454b927d-libxl-fix-dom-restore.patch
# Patches pending upstream review
Patch100: libxl-dom-reset.patch
Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch