libvirt/src/rpc
Peter Krempa d0e1501518 rpc: Fix crash on error paths of message dispatching
This patch resolves CVE-2013-0170:
https://bugzilla.redhat.com/show_bug.cgi?id=893450

When reading and dispatching of a message failed the message was freed
but wasn't removed from the message queue.

After that when the connection was about to be closed the pointer for
the message was still present in the queue and it was passed to
virNetMessageFree which tried to call the callback function from an
uninitialized pointer.

This patch removes the message from the queue before it's freed.

* rpc/virnetserverclient.c: virNetServerClientDispatchRead:
    - avoid use after free of RPC messages
(cherry picked from commit 46532e3e8e)
2013-01-28 20:04:59 +01:00
..
gendispatch.pl Consistent style for usage of sizeof operator 2012-03-30 11:47:24 +01:00
genprotocol.pl rpc: generalize solution for VPATH builds 2012-03-08 08:49:38 -07:00
gensystemtap.pl Rewrite all the DTrace/SystemTAP probing 2011-10-11 11:26:13 +01:00
virkeepalive.c rpc: Remove unused parameter in virKeepAliveStopInternal 2012-08-12 21:15:47 -04:00
virkeepalive.h rpc: Remove unused parameter in virKeepAliveStopInternal 2012-08-12 21:15:47 -04:00
virkeepaliveprotocol.x Define keepalive protocol 2011-11-24 11:44:08 +01:00
virnetclient.c client rpc: Fix error checking after poll() 2012-08-12 21:15:47 -04:00
virnetclient.h keepalive: Add ability to disable keepalive messages 2012-08-12 21:15:47 -04:00
virnetclientprogram.c Split virNetClientSend into 2 methods 2011-11-16 10:48:46 +00:00
virnetclientprogram.h Add client side support for FD passing 2011-10-28 10:42:54 +01:00
virnetclientstream.c Fix sync issue in virNetClientStreamEventRemoveCallback 2012-06-14 18:23:21 -04:00
virnetclientstream.h stream: Check for stream EOF 2012-01-12 12:02:40 +01:00
virnetmessage.c build: prohibit raw malloc and free 2012-02-03 10:41:45 -07:00
virnetmessage.h Fix sending/receiving of FDs when stream returns EAGAIN 2011-11-07 09:26:59 +00:00
virnetprotocol.x Extend RPC protocol to allow FD passing 2011-10-28 10:27:15 +01:00
virnetsaslcontext.c Consistent style for usage of sizeof operator 2012-03-30 11:47:24 +01:00
virnetsaslcontext.h Generic module for handling SASL authentication & encryption 2011-06-24 11:48:25 +01:00
virnetserver.c virnetserver: handle sigaction correctly 2012-04-25 16:39:27 -04:00
virnetserver.h Implement keepalive protocol in libvirt daemon 2011-11-24 11:44:08 +01:00
virnetserverclient.c rpc: Fix crash on error paths of message dispatching 2013-01-28 20:04:59 +01:00
virnetserverclient.h Rename APIs for fetching UNIX socket credentials 2012-01-19 15:39:52 +00:00
virnetservermdns.c Fix memory leaks in MDNS code 2011-07-26 08:09:18 +08:00
virnetservermdns.h Introduce generic RPC module for advertising via MDNS 2011-06-24 11:48:41 +01:00
virnetserverprogram.c security: Fix libvirtd crash possibility 2012-09-19 11:02:40 -06:00
virnetserverprogram.h Extend RPC server to allow FD passing 2011-10-28 10:43:00 +01:00
virnetserverservice.c Support changing UNIX socket owner in virNetSocketNewListenUNIX 2011-08-15 15:21:31 +02:00
virnetserverservice.h daemon: Unlink unix socket paths on shutdown 2011-08-04 16:54:58 +08:00
virnetsocket.c Fix daemon auto-spawning 2012-08-12 19:23:51 -04:00
virnetsocket.h Rename APIs for fetching UNIX socket credentials 2012-01-19 15:39:52 +00:00
virnettlscontext.c Fix comment about GNUTLS initialization/cleanup 2012-04-16 12:40:48 +01:00
virnettlscontext.h daemon: Move TLS initialization to virInitialize 2011-08-25 10:22:03 +02:00