- Jun 24, 2019
-
-
Jano Tomko authored
These APIs can be used to execute arbitrary emulators. Forbid them on read-only connections. Fixes: CVE-2019-10168 Signed-off-by:
Ján Tomko <jtomko@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> (cherry picked from commit bf6c2830) Signed-off-by:
Ján Tomko <jtomko@redhat.com>
-
Jano Tomko authored
This API can be used to execute arbitrary emulators. Forbid it on read-only connections. Fixes: CVE-2019-10167 Signed-off-by:
Ján Tomko <jtomko@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> (cherry picked from commit 8afa68ba) Signed-off-by:
Ján Tomko <jtomko@redhat.com>
-
Jano Tomko authored
The virDomainManagedSaveDefineXML can be used to alter the domain's config used for managedsave or even execute arbitrary emulator binaries. Forbid it on read-only connections. Fixes: CVE-2019-10166 Reported-by:
Matthias Gerstner <mgerstner@suse.de> Signed-off-by:
Ján Tomko <jtomko@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> (cherry picked from commit db0b7845) Signed-off-by:
Ján Tomko <jtomko@redhat.com>
-
Jano Tomko authored
The virDomainSaveImageGetXMLDesc API is taking a path parameter, which can point to any path on the system. This file will then be read and parsed by libvirtd running with root privileges. Forbid it on read-only connections. Fixes: CVE-2019-10161 Reported-by:
Matthias Gerstner <mgerstner@suse.de> Signed-off-by:
Ján Tomko <jtomko@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> (cherry picked from commit aed6a032) Signed-off-by:
Ján Tomko <jtomko@redhat.com> Conflicts: src/libvirt-domain.c src/remote/remote_protocol.x Upstream commit 12a51f37 which introduced the VIR_DOMAIN_SAVE_IMAGE_XML_SECURE alias for VIR_DOMAIN_XML_SECURE is not backported. Just skip the commit since we now disallow the whole API on read-only connections, regardless of the flag. Signed-off-by:
Ján Tomko <jtomko@redhat.com>
-
- May 21, 2019
-
-
Daniel P. Berrangé authored
The virtlogd daemon's only intended client is the libvirtd daemon. As such it should never allow clients from other user accounts to connect. The code already enforces this and drops clients from other UIDs, but we can get earlier (and thus stronger) protection against DoS by setting the socket permissions to 0600 Fixes CVE-2019-10132 Reviewed-by:
Ján Tomko <jtomko@redhat.com> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> (cherry picked from commit e37bd65f)
-
Daniel P. Berrangé authored
The virtlockd daemon's only intended client is the libvirtd daemon. As such it should never allow clients from other user accounts to connect. The code already enforces this and drops clients from other UIDs, but we can get earlier (and thus stronger) protection against DoS by setting the socket permissions to 0600 Fixes CVE-2019-10132 Reviewed-by:
Ján Tomko <jtomko@redhat.com> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> (cherry picked from commit f111e094)
-
Daniel P. Berrangé authored
The admin protocol RPC messages are only intended for use by the user running the daemon. As such they should not be allowed for any client UID that does not match the server UID. Fixes CVE-2019-10132 Reviewed-by:
Ján Tomko <jtomko@redhat.com> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> (cherry picked from commit 96f41cd7)
-
- Nov 04, 2018
-
-
Daniel Veillard authored
* docs/news.xml: updated for release Signed-off-by:
Daniel Veillard <veillard@redhat.com>
-
- Nov 02, 2018
-
-
Andrea Bolognani authored
Signed-off-by:
Andrea Bolognani <abologna@redhat.com> Reviewed-by:
Laine Stump <laine@laine.org>
-
- Oct 30, 2018
-
-
Daniel P. Berrangé authored
The result of libssh2_userauth_password is being assigned to 'ret' in one branch and 'rc' in the other branch. Checks are all done against the 'ret' variable, so one branch never does the correct check. Reviewed-by:
Andrea Bolognani <abologna@redhat.com> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com>
-
- Oct 29, 2018
-
-
Signed-off-by:
Boris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Chris Venteicher <cventeic@redhat.com>
-
Adjusting domain format documentation, adding device address support and adding command line generation for vfio-ap. Since only one mediated hostdev with model vfio-ap is supported a check disallows to define domains with more than one such hostdev device. Signed-off-by:
Boris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by:
Bjoern Walk <bwalk@linux.ibm.com> Reviewed-by:
Chris Venteicher <cventeic@redhat.com>
-
Introduce vfio-ap capability. Signed-off-by:
Boris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by:
Bjoern Walk <bwalk@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Chris Venteicher <cventeic@redhat.com>
-
- Oct 23, 2018
-
-
Pavel Hrdina authored
Signed-off-by:
Pavel Hrdina <phrdina@redhat.com>
-
Martin Kletzander authored
We already have that in the code (commit c1bc9c66), we just forgot to mention that in the docs. Signed-off-by:
Martin Kletzander <mkletzan@redhat.com>
-
- Oct 22, 2018
-
-
Martin Kletzander authored
Signed-off-by:
Martin Kletzander <mkletzan@redhat.com>
-
- Oct 19, 2018
-
-
IOThread pids info will lost after libvirtd restart, then if we call pinIOThread, sched_setaffinity will be called with pid 0, not IOThread pid. So pinIOThread cannot work normally. Signed-off-by: Jie Wang <wangjie88.huawei.com> Reviewed-by:
John Ferlan <jferlan@redhat.com>
-
Eric Blake authored
virXMLFormatElement() frees attrBuf on success, but not necessarily on failure. Most other callers of this function take the time to reset attrBuf afterwords, but qemuDomainObjPrivateXMLFormatBlockjobs() was relying on it succeeding, and could thus result in a memory leak. Signed-off-by:
Eric Blake <eblake@redhat.com> ACKed-by:
Michal Privoznik <mprivozn@redhat.com>
-
Michal Privoznik authored
https://bugzilla.redhat.com/show_bug.cgi?id=1640465 Weirdly enough, there can be symlinks in the path we are trying to fix. If it is the case our clever algorithm that finds matches against mount table won't work. Canonicalize path at the beginning then. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Erik Skultety <eskultet@redhat.com>
-
Michal Privoznik authored
The virFileInData() function should return to the caller if the current position the passed file is in is a data section or a hole (and also how long the current section is). At any rate, upon return from this function (be it successful or not) the original position in the file is restored. This may mess up with errno which might have been set earlier. Save the errno into a local variable so it can be restored for the caller's sake. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Martin Kletzander <mkletzan@redhat.com>
-
- Oct 18, 2018
-
-
The QEMU @cfg config variable is unused in context of qemuProcessInit, let's drop it. Signed-off-by:
Bjoern Walk <bwalk@linux.ibm.com> Reviewed-by:
Erik Skultety <eskultet@redhat.com>
-
- Oct 17, 2018
-
-
If the learning thread is configured to learn on all ethernet frames (which is hardcoded) then chances are high that there is a packet on every iteration of inspecting frames loop. As result we will hang on shutdown because we don't check threadsTerminate if there is packet. Let's just check termination conditions on every iteration. Since we'll check each iteration, the check after pcap_next essentially is unnecessary since on failure we'd loop back to the top and timeout and then fail. Signed-off-by:
Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Reviewed-by:
John Ferlan <jferlan@redhat.com>
-
Signed-off-by:
Wang Huaqiang <huaqiang.wang@intel.com> Reviewed-by:
Andrea Bolognani <abologna@redhat.com>
-
Signed-off-by:
Han Han <hhan@redhat.com> Reviewed-by:
Andrea Bolognani <abologna@redhat.com>
-
Michal Privoznik authored
https://bugzilla.redhat.com/show_bug.cgi?id=1632833 When doing a SCSI passthrough we don't put format= onto the command line. This causes qemu to probe the format automatically which ends up in a warning in the domain log and possible qemu disabling writes to the first block (according to the warning message). Based-on-work-of: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
- Oct 15, 2018
-
-
The @Alloc object returned by virDomainResctrlVcpuMatch is not properly referenced and un-referenced in virDomainCachetuneDefParse. This patch fixes this problem. Signed-off-by:
Wang Huaqiang <huaqiang.wang@intel.com> Reviewed-by:
John Ferlan <jferlan@redhat.com>
-
Jano Tomko authored
Commit ed5aa85f qemu: don't use chardev FD passing for vhostuser backend altered the legacy DO_TEST macro. Run the test against capabilities of QEMU 2.5.0 (which did not support QEMU_CAPS_CHARDEV_FD_PASS) as well as the latest version. Signed-off-by:
Ján Tomko <jtomko@redhat.com>
-
Jano Tomko authored
Test RNG devices connected to EGD via UNIX sockets. Signed-off-by:
Ján Tomko <jtomko@redhat.com>
-
Jano Tomko authored
Test USB redirdevs backed by UNIX sockets. Signed-off-by:
Ján Tomko <jtomko@redhat.com>
-
Jano Tomko authored
Test a virtio console backed by a UNIX socket. Signed-off-by:
Ján Tomko <jtomko@redhat.com>
-
Jano Tomko authored
Test guestfwd channels backed by UNIX sockets. Signed-off-by:
Ján Tomko <jtomko@redhat.com>
-
Jano Tomko authored
Test creating a parallel port backed by a UNIX socket. Signed-off-by:
Ján Tomko <jtomko@redhat.com>
-
Jano Tomko authored
Test CCID smartcard passthrough from a unix listen socket. Use the capabilities of QEMU 2.5.0 which did not support chardev FD passing and the latest one, which (at the time of this commit) it does. Signed-off-by:
Ján Tomko <jtomko@redhat.com>
-
- Oct 12, 2018
-
-
Peter Krempa authored
The URI parser used by libvirt does not populate uri->path if the trailing slash is missing. The code virStorageSourceParseBackingURI would then not populate src->path. As only NBD network disks are allowed to have the 'name' field in the XML defining the disk source omitted we'd generate an invalid XML which we'd not parse again. Fix it by populating src->path with an empty string if the uri is lacking slash. As pointed out above NBD is special in this case since we actually allow it being NULL. The URI path is used as export name. Since an empty export does not make sense the new approach clears the src->path if the trailing slash is present but nothing else. Add test cases now to cover all the various cases for NBD and non-NBD uris as there was to time only 1 test abusing the quirk witout slash for NBD and all other URIs contained the slash or in case of NBD also the export name. Signed-off-by:
Peter Krempa <pkrempa@redhat.com>
-
Peter Krempa authored
The name is misleading. Change it to 'uristr' so that 'path' can be reused in the proper context later. Signed-off-by:
Peter Krempa <pkrempa@redhat.com>
-
Eric Blake authored
Commit 4f4c3b13 (v3.3) fixed an issue where performing cleanup of libvirt objects could sometimes lose error messages, by adding code to copy the libvirt error into last_error prior to cleanup paths. However, it caused a regression: on other paths, some errors are now printed twice, if libvirt still remembers in its thread-local storage that an error was set even after virsh cleared last_error. For example: $ virsh -c test:///default snapshot-delete test blah error: Domain snapshot not found: no domain snapshot with matching name 'blah' error: Domain snapshot not found: no domain snapshot with matching name 'blah' Fix things by telling libvirt to discard any thread-local errors at the same time virsh prints an error message (whether or not the libvirt error is the same as what is stored in last_error). Update the virsh-undefine testsuite (partially reverting portions of commit b620bdee, by removing -q, to more easily pinpoint which commands are causing which messages), now that there is only one error message instead of two. Signed-off-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com>
-
If the same source gets built twice ('build same source on different hosts at different times') the resulting files may differ. Fix this by sorting the hash keys before usage. Signed-off-by:
Olaf Hering <olaf@aepfle.de>
-
- Oct 11, 2018
-
-
John Ferlan authored
The function was never defined in source, just the protoype. Signed-off-by:
John Ferlan <jferlan@redhat.com>
-
Michal Privoznik authored
The mock is built on Linux only. Therefore we should load it only on Linux too. This fixes the FreeBSD build. Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Andrea Bolognani <abologna@redhat.com>
-
- Oct 10, 2018
-
-
Michal Privoznik authored
There are couple of things wrong with the current implementation. The first one is that in the first loop the code tries to build a list of fuse.glusterfs mount points. Well, since the strings are allocated in a temporary buffer and are not duplicated this results in wrong decision made later in the code. The second problem is that the code does not take into account subtree mounts. For instance, if there's a fuse.gluster mounted at /some/path and another FS mounted at /some/path/subdir the code would not recognize this subdir mount. Reported-by:
Han Han <hhan@redhat.com> Signed-off-by:
Michal Privoznik <mprivozn@redhat.com> Reviewed-by:
Jiri Denemark <jdenemar@redhat.com>
-