- Update from version 10.0.0 to 10.7.0 - Update of rootfile - 1 CVE fix in 10.7.0 and 1 in 10.1.0 - Changelog 10.7.0 * **Security** * CVE-2024-8235: Crash of ``virtinterfaced`` via ``virConnectListInterfaces()`` A refactor of the code fetching the list of interfaces for multiple APIs introduced corner case on platforms where allocating 0 bytes of memory results in a NULL pointer. This corner case would lead to a NULL-pointer dereference and subsequent crash of ``virtinterfaced`` if ``virConnectListInterfaces()`` is called requesting 0 networks to be filled. The bug was introduced in libvirt-10.4.0 * **New features** * qemu: Introduce the ability to disable the built-in PS/2 controller It is now possible to control the state of the ``ps2`` feature in the domain XML for descendants of the generic PC machine type (``i440fx``, ``q35``, ``xenfv`` and ``isapc``). * **Improvements** * ch: support restore with network devices Cloud-Hypervisor starting from V40.0 supports restoring file descriptor backed network devices. So, create new net fds and pass them via SCM_RIGHTS to CH during restore operation. * ch: support basic networking modes Cloud-Hypervisor driver now supports Ethernet, Network (NAT) and Bridge networking modes. 10.6.0 * **Removed features** * qemu: Require QEMU-5.2.0 or newer The minimal required version of QEMU was bumped to 5.2.0. * **New features** * qemu: Add support for the 'pauth' Arm CPU feature * Introduce pstore device The aim of pstore device is to provide a bit of NVRAM storage for guest kernel to record oops/panic logs just before it crashes. Typical usage includes usage in combination with a watchdog so that the logs can be inspected after the watchdog rebooted the machine. * **Improvements** * qemu: Set 'passt' net backend if 'default' is unsupported If QEMU is compiled without SLIRP support, and if domain XML allows it, starting from this release libvirt will use passt as the default backend instead. Also, supported backends are now reported in the domain capabilities XML. * qemu: add a monitor to /proc/$pid when killing times out In cases when a QEMU process takes longer to be killed, libvirt might have skipped cleaning up after it. But now a /proc/$pid watch is installed so this does not happen ever again. * **Bug fixes** * virt-aa-helper: Allow RO access to /usr/share/edk2-ovmf When binary version of edk2 is distributed, the files reside under /usr/share/edk2-ovmf. Allow virt-aa-helper to generate paths under that directory. * virt-host-validate: Allow longer list of CPU flags During its run, virt-host-validate parses /proc/cpuinfo to learn about CPU flags. But due to a bug it parsed only the first 1024 bytes worth of CPU flags leading to unexpected results. The file is now parsed properly. * capabilities: Be more forgiving when decoding OEM strings On some systems, OEM strings are scattered in multiple sections. This confused libvirt when generating capabilities XML. Not anymore. 10.5.0 * **New features** * Introduce SEV-SNP support SEV-SNP is introduced as another type of ``<launchSecurity/>``. Its support is reported in both domain capabilities and ``virt-host-validate``. * **Improvements** * tools: virt-pki-validate has been rewritten in C The ``virt-pki-validate`` shell script has been rewritten as a C program, providing an output format that matches ``virt-host-validate``, removing the dependency on ``certtool`` and providing more comprehensive checks of the certificate properties. * qemu: implement iommu coldplug/unplug The ``<iommu/>`` device can be now cold plugged and/or cold unplugged. * Pass shutoff reason to release hook Sometimes in release hook it is useful to know if the VM shutdown was graceful or not. This is especially useful to do cleanup based on the VM shutdown failure reason in release hook. Starting with this release the last argument 'extra' is used to pass VM shutoff reason in the call to release hook. * nodedev: improve DASD detection In newer DASD driver versions the ID_TYPE tag is supported. This tag is missing after a system reboot but when the ccw device is set offline and online the tag is included. To fix this version independently we need to check if a device detected as type disk is actually a DASD to maintain the node object consistency and not end up with multiple node objects for DASDs. * **Bug fixes** * remote_daemon_dispatch: Unref sasl session when closing client connection A memory leak was identified when a client started SASL but then suddenly closed connection. This is now fixed. * qemu: Fix migration with disabled vmx-* CPU features Migrating a domain with some vmx-* CPU features marked as disabled could have failed as the destination would incorrectly expect those features to be enabled after starting QEMU. * qemu: Fix ``libvirtd``/``virtqemud`` crash when VM shuts down during migration The libvirt daemon could crash when a VM was shut down while being migrated to another host. 10.4.0 * **New features** * qemu: Support for ras feature for virt machine type It is now possible to set on/off ``ras`` feature in the domain XML for virt (Arm) machine type as ``<ras state='on'/>``. * SSH proxy for VM Libvirt now installs a binary helper that allows connecting to QEMU domains via SSH using the following scheme: ``ssh user@qemu/virtualMachine``. * qemu: Support for ``virtio`` sound model Sound devices can now be configured to use the virtio model with ``<sound model='virtio'/>``. This model is available from QEMU 8.2.0 onwards. * network: use nftables to setup virtual network firewall rules The network driver can now use nftables rules for the virtual network firewalls, rather than iptables. With the standard build options, nftables is preferred over iptables (with fallback to iptables if nftables isn't installed), but this can be modified at build time, or at runtime via the firewall_backend setting in network.conf. (NB: the nwfilter driver still uses ebtables/iptables). * **Improvements** * qemu: add zstd to supported compression formats Extend the list of supported formats of QEMU save image by adding zstd compression. * qemu: Implement support for hotplugging evdev input devices As of this release, hotplug and hotunplug of evdev ``<input/>`` devices is supported. * **Bug fixes** * virsh/virt-admin: Fix ``--help`` option for all commands A bug introduced in `v10.3.0 (2024-05-02)`_ caused that the attempt to print help for any command by using the ``--help`` option in ``virsh`` and ``virt-admin`` would print:: $ virsh list --help error: command 'list' doesn't support option --help instead of the help output. A workaround for the affected version is to use the help command:: $ virsh help list * qemu: Fix ``virsh save`` and migration when storage in question is root_squashed NFS Attempting to save a VM to a root_squash NFS mount or migrating with disks hosted on such mount could, in some scenarios, result in error stating:: 'Unknown error 255' The bug was introduced in `v10.1.0 (2024-03-01)`_. * qemu: Don't set affinity for isolcpus unless explicitly requested When starting a domain, by default libvirt sets affinity of QEMU process to all online CPUs. This also included isolated CPUs (``isolcpus=``) which is wrong. As of this release, isolated CPUs are left untouched, unless explicitly configured in domain XML. * qemu_hotplug: Properly assign USB address to hotplugged usb-net device Previously, the network device hotplug logic would try to ensure only CCW or PCI addresses. With recent support for the usb-net model, USB addresses for usb-net network devices are assigned automatically. * qemu: Fix hotplug of ``virtiofs`` filesystem device with ``<boot order=`` set The bug was introduced in `v10.3.0 (2024-05-02)`_ when attempting to reject unsupported configurations. During hotplug the addresses are assigned after validation and thus errorneously reject valid configs. 10.3.0 * **New features** * qemu: Proper support for USB network device USB address is now automatically assigned to USB network devices thus they can be used without manual configuration. * conf: Introduce memReserve attribute to <controller/> Some PCI devices have large non-prefetchable memory. This can be a problem in case when such device needs to be hotplugged as the firmware can't foresee such situation. The user thus can override the value calculated at start to accomodate for such devices. * **Improvements** * Improve validation of USB devices Certain USB device types ('sound', 'fs', 'chr', 'ccid' and 'net') were not properly handled in the check whether the VM config supports USB and thus would result in poor error messages. * virsh: Fix behaviour of ``--name`` and ``--parent`` used together when listing checkpoint and snapshots The ``checkpoint-list`` and ``snapshot-list`` commands would ignore the ``--name`` option to print only the name when used with ``--parent``. * Extend libvirt-guests to shutdown only persistent VMs Users can now choose to shutdown only persistent VMs when the host is being shut down. * **Bug fixes** * qemu: Fix migration with custom XML Libvirt 10.2.0 would sometimes complain about incompatible CPU definition when trying to migrate or save a domain and passing a custom XML even though such XML was properly generated as migratable. Hitting this bug depends on the guest CPU definition and the host on which a particular domain was running. * qemu: Fix TLS hostname verification failure in certain non-shared storage migration scenarios In certain scenarios (parallel migration, newly also post-copy migration) libvirt would wrongly pass an empty hostname to QEMU to be used for TLS certificate hostname validation, which would result into failure of the non-shared storage migration step:: error: internal error: unable to execute QEMU command 'blockdev-add': Certificate does not match the hostname * Create OVS ports as transient Libvirt now creates OVS ports as transient which prevents them from reappearing or going stale on sudden reboots. * Clear OVS QoS settings when domain shuts down Libvirt now clears QoS settings on domain shutdown, so they no longer pile up in OVS database. 10.2.0 * **New features** * ch: Basic save and restore support for ch driver The ch driver now supports basic save and restore operations. This is functional on domains without any network, host device config defined. The ``path`` parameter for save and restore should be a directory. * qemu: Support for driver type ``mtp`` in ``<filesystem/>`` devices The ``mtp`` driver type exposes the ``usb-mtp`` device in QEMU. The guest can access files on this driver through the Media Transfer Protocol (MTP). * qemu: Added support for the loongarch64 architecture It is now possible for libvirt to run loongarch64 guests, including on other architectures via TCG. For the best results, it is recommended to use the upcoming QEMU 9.0.0 release together with the development version of edk2. * qemu: Introduce virDomainGraphicsReload API Reloading the graphics display is now supported for QEMU guests using VNC. This is useful to make QEMU reload the TLS certificates without restarting the guest. Available via the ``virDomainGraphicsReload`` API and the ``domdisplay-reload`` virsh command. * **Bug fixes** * qemu: Fix migration from libvirt older than 9.10.0 when vmx is enabled A domain with vmx feature enabled (which may be even done automatically with ``mode='host-model'``) started by libvirt 9.9.0 or older cannot be migrated to libvirt 9.10.0, 10.0.0, and 10.1.0 as the target host would complain about a lot of extra ``vmx-*`` features. Migration of similar domains started by the affected releases to libvirt 9.9.0 and older does not work either. Since libvirt 10.2.0 migration works again with libvirt 9.9.0 and older in both directions. Migration from the affected releases to 10.2.0 works as well, but the other direction remains broken unless the fix is backported. * node_device: Don't report spurious errors from PCI VPD parsing In last release the PCI Vital Product Data parser was enhanced to report errors but that effort failed as some kernels have the file but don't allow reading it causing logs to be spammed with:: libvirtd[21055]: operation failed: failed to read the PCI VPD data Since the data is used only in the node device XML and errors are ignored if the parsing failed, this release removes all the error reporting. * qemu: set correct SELinux label for unprivileged virtiofsd It is now possible to use virtiofsd-based ``<filesystem>`` shares even if the guest is confined using SELinux. * qemu: fix a crash on unprivileged virtiofsd hotplug Hotplugging virtiofsd-based filesystems works now. * virt-admin: Fix segfault when libvirtd dies ``virt-admin`` no longer crashes when ``libvirtd`` unexpectedly closes the connection. 10.1.0 * **Security** * ``CVE-2024-1441``: Fix off-by-one error leading to a crash In **libvirt-1.0.0** there were couple of interface listing APIs introduced which had an off-by-one error. That error could lead to a very rare crash if an array was passed to those functions which did not fit all the interfaces. In **libvirt-5.10** a check for non-NULL arrays has been adjusted to allow for NULL arrays with size 0 instead of rejecting all NULL arrays. However that made the above issue significantly worse since that off-by-one error now did not write beyond an array, but dereferenced said NULL pointer making the crash certain in a specific scenario in which a NULL array of size 0 was passed to the aforementioned functions. * **New features** * nodedev: Support updating mdevs The node device driver has been extended to allow updating mediated node devices. Options are available to target the update against the persistent, active or both configurations of a mediated device. **Note:** The support is only available with at least mdevctl v1.3.0 installed. * qemu: Add support for /dev/userfaultfd On hosts with new enough kernel which supports /dev/userfaultfd libvirt will now automatically grant QEMU access to this device. It's no longer needed to set vm.unprivileged_userfaultfd sysctl. * qemu: Support clusters in CPU topology It is now possible to configure the guest CPU topology to use clusters. Additionally, if CPU clusters are present in the host topology, they will be reported as part of the capabilities XML. * network: Make virtual domains resolvable from the host When starting a virtual network with a new ``register='yes'`` attribute in the ``<domain>`` element, libvirt will configure ``systemd-resolved`` to resolve names of the connected guests using the name server started for this network. * qemu: Introduce dynamicMemslots attribute for virtio-mem QEMU now allows setting ``.dynamic-memslots`` attribute for virtio-mem-pci devices. When turned on, it allows memory exposed to guest to be split into multiple memory slots and thus smaller memory footprint (see the original commit for detailed explanation). * **Improvements** * nodedev: Add ability to update persistent mediated devices by defining them Existing persistent mediated devices can now also be updated by ``virNodeDeviceDefineXML()`` as long as parent and UUID remain unchanged. * ch: Enable ``ethernet`` interface mode support ``<interface type='ethernet'/>`` can now be used for CH domains. * viraccessdriverpolkit: Add missing vtpm case Secrets with ``<usage type='vtpm'>`` were left unable to be checked for in the access driver, i.e. in ACL rules. Missing code was provided. * virt-admin: Notify users to use explicit URI if connection fails ``virt-admin`` doesn't try to guess the URI of the daemon to manage so a failure to connect may be confusing for users if modular daemons are used. Add a hint to use the URI of the dameon to manage. * **Bug fixes** * qemu_process: Skip over non-virtio non-TAP NIC models when refreshing rx-filter If ``trustGuestRxFilters`` is enabled for a vNIC that doesn't support it, libvirt may throw an error when such domain is being started, loaded from a saved state, migrated, etc. These errors are now silenced, but make sure to fix such configurations (after previous release it is even possible to change ``trustGuestRxFilters`` value on live domains via ``virDomainUpdateDeviceFlags()`` or ``virsh device-update``). * domain: Fix check for overlapping ``<memory/>`` devices A bug was identified which caused libvirt to report two NVDIMMs as overlapping even though they weren't. This now fixed. * vmx: Accept empty fileName for cdrom-image Turns out, ``fileName`` attribute (which contains path to CDROM image) can be set to an empty string (``""``) to denote a state in which the CDROM has no medium in it. Libvirt used to reject such configuration file, but not anymore. * qemu_hotplug: Don't lose 'created' flag in qemuDomainChangeNet() When starting a domain, libvirt tracks what resources it created for it and which were pre-existing and uses this information to preserve pre-existing resources when cleaning up after said domain is shut off. But for macvtaps this information was lost after the macvtap device was changed (e.g. via ``virsh update-device``). * Fix virStream hole handling When a client sent multiple holes into a virStream it may have caused daemon hangup as the daemon stopped processing RPC from the client temporarily. This is now fixed. * nodedev: Don't generate broken XML with certain hardware A broken node device XML would be generated in a rare case when a hardware device had certain characters in the VPD fields. * qemu: Fix reservation of manually specified port for disk migration A manually specified port would not be relased after disk migration making it impossible to use it again.
Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- config/rootfiles/packages/libvirt | 14 ++++++++++---- lfs/libvirt | 6 +++--- 2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/config/rootfiles/packages/libvirt b/config/rootfiles/packages/libvirt index f1031b079..32fdd5cce 100644 --- a/config/rootfiles/packages/libvirt +++ b/config/rootfiles/packages/libvirt @@ -52,6 +52,8 @@ etc/logrotate.d/libvirtd.qemu etc/rc.d/init.d/libvirt-guests etc/rc.d/init.d/libvirtd etc/rc.d/init.d/virtlogd +#etc/ssh/ssh_config.d +etc/ssh/ssh_config.d/30-libvirt-ssh-proxy.conf usr/bin/virsh usr/bin/virt-admin usr/bin/virt-host-validate @@ -85,16 +87,16 @@ usr/bin/virt-xml-validate #usr/lib/libvirt #usr/lib/libvirt-admin.so usr/lib/libvirt-admin.so.0 -usr/lib/libvirt-admin.so.0.10000.0 +usr/lib/libvirt-admin.so.0.10007.0 #usr/lib/libvirt-lxc.so usr/lib/libvirt-lxc.so.0 -usr/lib/libvirt-lxc.so.0.10000.0 +usr/lib/libvirt-lxc.so.0.10007.0 #usr/lib/libvirt-qemu.so usr/lib/libvirt-qemu.so.0 -usr/lib/libvirt-qemu.so.0.10000.0 +usr/lib/libvirt-qemu.so.0.10007.0 #usr/lib/libvirt.so usr/lib/libvirt.so.0 -usr/lib/libvirt.so.0.10000.0 +usr/lib/libvirt.so.0.10007.0 #usr/lib/libvirt/connection-driver usr/lib/libvirt/connection-driver/libvirt_driver_ch.so usr/lib/libvirt/connection-driver/libvirt_driver_interface.so @@ -118,6 +120,9 @@ usr/lib/libvirt/storage-file/libvirt_storage_file_fs.so #usr/lib/sysctl.d usr/lib/sysctl.d/60-libvirtd.conf usr/lib/sysctl.d/60-qemu-postcopy-migration.conf +#usr/lib/sysusers.d +usr/lib/sysusers.d/libvirt-qemu.conf +usr/libexec/libvirt-ssh-proxy usr/libexec/libvirt_iohelper usr/libexec/virt-login-shell-helper usr/sbin/libvirtd @@ -253,6 +258,7 @@ usr/share/libvirt/cpu_map/x86_EPYC-IBPB.xml usr/share/libvirt/cpu_map/x86_EPYC-Milan.xml usr/share/libvirt/cpu_map/x86_EPYC-Rome.xml usr/share/libvirt/cpu_map/x86_EPYC.xml +usr/share/libvirt/cpu_map/x86_GraniteRapids.xml usr/share/libvirt/cpu_map/x86_Haswell-IBRS.xml usr/share/libvirt/cpu_map/x86_Haswell-noTSX-IBRS.xml usr/share/libvirt/cpu_map/x86_Haswell-noTSX.xml diff --git a/lfs/libvirt b/lfs/libvirt index ef122cfa7..4ac7dbf90 100644 --- a/lfs/libvirt +++ b/lfs/libvirt @@ -26,7 +26,7 @@ include Config
SUMMARY = Server side daemon and supporting files for libvirt
-VER = 10.0.0 +VER = 10.7.0
THISAPP = libvirt-$(VER) DL_FILE = $(THISAPP).tar.xz @@ -35,7 +35,7 @@ DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) SUP_ARCH = x86_64 aarch64 PROG = libvirt -PAK_VER = 34 +PAK_VER = 35
DEPS = ebtables libpciaccess libyajl ncat qemu
@@ -49,7 +49,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_BLAKE2 = bfbea7805a949999481293a31e52a5511bcf86db2c96486cbc3b9cb776719ec973b1208cfcb4a8ae2c9220d1d68053980eaf68893f7919c3ef354efbd1abf642 +$(DL_FILE)_BLAKE2 = 331f8c01395c70536ac094a156810f93cd85aab9f25bdde40633698a27f5863cb5c88c520199a5182318f376cb1a3484f3c487da74a41925a521c4a305c51f13
install : $(TARGET) check : $(patsubst %,$(DIR_CHK)/%,$(objects))