From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmOEw-0002Et-Sw for qemu-devel@nongnu.org; Tue, 20 Sep 2016 12:49:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmOEs-00029q-2W for qemu-devel@nongnu.org; Tue, 20 Sep 2016 12:49:50 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:51774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmOEr-00029Y-RB for qemu-devel@nongnu.org; Tue, 20 Sep 2016 12:49:46 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8KGmDmj015351 for ; Tue, 20 Sep 2016 12:49:44 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0a-001b2d01.pphosted.com with ESMTP id 25k7bhw1r9-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 20 Sep 2016 12:49:44 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 20 Sep 2016 10:49:43 -0600 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth In-Reply-To: <20160914150210.GA9563@redhat.com> References: <1465309053-5784-1-git-send-email-berrange@redhat.com> <20160914150210.GA9563@redhat.com> Date: Tue, 20 Sep 2016 11:49:34 -0500 Message-Id: <20160920164934.7471.89469@loki> Subject: Re: [Qemu-devel] [Qemu-stable] [PATCH STABLE 2.5] vnc: fix VNC websockets TLS handshake List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Ben Aitchison , qemu-stable@nongnu.org, Gerd Hoffmann Quoting Daniel P. Berrange (2016-09-14 10:02:10) > ping > = > Is qemu-stable dead for the 2.5 branch or was this just > missed ? The stable branches generally die once the next major release lands and I switch over to supporting the new stable tree. Generally there's x.y.1 stable release mid-development cycle for the next major release, and, depending on the severity/number of fixes or regressions in the x.y.1 release, an x.y.2 that overlaps with the x.y+1.0 major release. There may be any number of x.y.z.n CVE releases in between, but generally even for these we still drop support once the next major release has firmly landed and leave it to the downstreams to handle any LTS beyond that. > = > On Tue, Jun 07, 2016 at 03:17:33PM +0100, Daniel P. Berrange wrote: > > If the VNC websockets TLS handshake blocked, we register a > > callback to continue it after the socket signals data is > > available. Unfortunately we were mistakenly registering > > the wrong method callback, causing us to restart the TLS > > handshake from the begining, which obviously fails. > > = > > Reported-by: Ben Aitchison > > Signed-off-by: Daniel P. Berrange > > --- > > ui/vnc-ws.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > = > > NB this is a stable-2.5 only patch, with no equiv in master > > since the code was totally refactored in 2.6 > > = > > diff --git a/ui/vnc-ws.c b/ui/vnc-ws.c > > index 175ea50..a8cf180 100644 > > --- a/ui/vnc-ws.c > > +++ b/ui/vnc-ws.c > > @@ -22,8 +22,9 @@ > > #include "qemu/main-loop.h" > > #include "crypto/hash.h" > > = > > -static int vncws_start_tls_handshake(VncState *vs) > > +static void vncws_run_tls_handshake(void *opaque) > > { > > + VncState *vs =3D (VncState *)opaque; > > Error *err =3D NULL; > > = > > if (qcrypto_tls_session_handshake(vs->tls, &err) < 0) { > > @@ -42,22 +43,21 @@ static int vncws_start_tls_handshake(VncState *vs) > > = > > case QCRYPTO_TLS_HANDSHAKE_RECVING: > > VNC_DEBUG("Handshake interrupted (blocking read)\n"); > > - qemu_set_fd_handler(vs->csock, vncws_tls_handshake_io, NULL, v= s); > > + qemu_set_fd_handler(vs->csock, vncws_run_tls_handshake, NULL, = vs); > > break; > > = > > case QCRYPTO_TLS_HANDSHAKE_SENDING: > > VNC_DEBUG("Handshake interrupted (blocking write)\n"); > > - qemu_set_fd_handler(vs->csock, NULL, vncws_tls_handshake_io, v= s); > > + qemu_set_fd_handler(vs->csock, NULL, vncws_run_tls_handshake, = vs); > > break; > > } > > = > > - return 0; > > + return; > > = > > error: > > VNC_DEBUG("Handshake failed %s\n", error_get_pretty(err)); > > error_free(err); > > vnc_client_error(vs); > > - return -1; > > } > > = > > void vncws_tls_handshake_io(void *opaque) > > @@ -84,7 +84,7 @@ void vncws_tls_handshake_io(void *opaque) > > vs); > > = > > VNC_DEBUG("Start TLS WS handshake process\n"); > > - vncws_start_tls_handshake(vs); > > + vncws_run_tls_handshake(vs); > > } > > = > > void vncws_handshake_read(void *opaque) > > -- = > > 2.5.5 > > = > = > Regards, > Daniel > -- = > |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| > |: http://libvirt.org -o- http://virt-manager.or= g :| > |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| > |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :| >=20