Really don't crash if a connection closes early CVE-2014-1447-2 v1.2.1-rc2
authorJiri Denemark <jdenemar@redhat.com>
Mon, 13 Jan 2014 14:46:24 +0000 (15:46 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 13 Jan 2014 20:45:48 +0000 (21:45 +0100)
commit066c8ef6c18bc1faf8b3e10787b39796a7a06cc0
treea34781e5f128b9c36fc1460384a9efd6f89cb644
parentfbe472d58327c864a20400e174247212d07235cb
Really don't crash if a connection closes early

https://bugzilla.redhat.com/show_bug.cgi?id=1047577

When writing commit 173c291, I missed the fact virNetServerClientClose
unlocks the client object before actually clearing client->sock and thus
it is possible to hit a window when client->keepalive is NULL while
client->sock is not NULL. I was thinking client->sock == NULL was a
better check for a closed connection but apparently we have to go with
client->keepalive == NULL to actually fix the crash.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/rpc/virnetserverclient.c