mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-27 15:45:54 +00:00
When redirecting a USB webcam over a slow link, it's currently possible to hit an assertion in spice-server by running cheese (application using the webcam), killing the client with ctrl+c and then restarting the client: qemu-kvm: spicevmc.c:324: spicevmc_red_channel_alloc_msg_rcv_buf: Assertion `!state->recv_from_client_buf' failed. This happens when red_peer_handle_incoming tries to allocate memory for a message using spicevmc: handler->msg = handler->cb->alloc_msg_buf(handler->opaque, msg_type, msg_size); red_peer_handle_incoming() is called when there is client data to be read, and does - call alloc_msg_buf() to allocate memory for the message - read the message - if the read was partial, return early, the main loop will call again red_peer_handle_incoming() when there is more data available for that channel - parse the message - call release_msg_buf() to free the message For channels based on spicevmc (usbredir and port), alloc_msg_buf() stores message data in SpiceVmcState::recv_from_client_buf and before allocating new memory, it asserts that it's NULL. This is what causes this crash in the following scenario: - SpiceVmc::alloc_msg_buf() is called and allocates memory for a new message in SpiceVmcState::recv_from_client_buf - red_peer_handle_incoming() returns early as all the spicevmc message data hasn't been received yet - the client gets killed - the main channel notices the disconnect and calls main_dispatcher_client_disconnect() which will disconnect all the channels - SpiceVmc::on_disconnect is called - after the new client connects, SpiceVmc::alloc_msg_buf() is called, notices that SpiceVmcState::recv_from_client_buf is already set, and asserts() This commit makes sure the partial SpiceVmcState::recv_from_client_buf data is cleared on disconnect so that the assert does not trigger. This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1264113 |
||
|---|---|---|
| build-aux | ||
| docs | ||
| m4 | ||
| server | ||
| spice-common@c3f2d217af | ||
| tests | ||
| tools | ||
| uncrustify_cfg | ||
| .gitignore | ||
| .gitmodules | ||
| .mailmap | ||
| .travis.yml | ||
| AUTHORS | ||
| autogen.sh | ||
| cfg.mk | ||
| ChangeLog | ||
| configure.ac | ||
| COPYING | ||
| GNUmakefile | ||
| maint.mk | ||
| Makefile.am | ||
| NEWS | ||
| README | ||
| spice-server.pc.in | ||
| TODO.multiclient | ||
SPICE: Simple Protocol for Independent Computing Environments
=============================================================
SPICE is a remote display system built for virtual environments which
allows you to view a computing 'desktop' environment not only on the
machine where it is running, but from anywhere on the Internet and
from a wide variety of machine architectures.
Installation
------------
The SPICE package uses GNU autotools, so the build install process
follows the standard process documented in the INSTALL file. As a
quick start you can do
./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --libdir=/usr/lib
make
sudo make install
Or to install into a private user specific location
./configure --prefix=$HOME/spice
make
make install
The following mandatory dependancies are required in order to
build SPICE
Spice protocol >= 0.9.0
Pixman >= 0.17.7
OpenSSL
libjpeg
zlib
Cyrus-SASL
The following optional dependancies increase the available
functionality
GE Gui >= 0.6.0, < 0.7.0 (GUI app support)
OpenGL (GUI app support)
Alsa (Linux support)
XRandR >= 1.2 (X11 support)
Xinerama >= 1.0 (X11 support)
libcacard >= 0.1.2 (Smartcard support)
Communication
-------------
To communicate with the development team, or to post patches
there is a technical mailing list:
http://lists.freedesktop.org/mailman/listinfo/spice-devel
There is also a mailing list for new release announcements:
http://lists.freedesktop.org/archives/spice-announce/
To view known bugs, or report new bugs, in SPICE visit
https://bugs.freedesktop.org/describecomponents.cgi?product=Spice
Bugs found when using an OS distribution's binary packages should
be reported to the OS vendors' own bug tracker first.
The latest SPICE code can be found in GIT at:
http://cgit.freedesktop.org/spice/
Licensing
---------
SPICE is provided under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
Please see the COPYING file for the complete LGPLv2+ license
terms, or visit <http://www.gnu.org/licenses/>.
Experimental Features
---------------------
To enable multiple client connections, set:
SPICE_DEBUG_ALLOW_MC=1
-- End of readme