Received: from eggs.gnu.org ([2001:4830:134:3::10]:33355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq028-00022q-QN for qemu-devel@nongnu.org; Fri, 30 Sep 2016 11:47:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bq026-00025m-2f for qemu-devel@nongnu.org; Fri, 30 Sep 2016 11:47:32 -0400 References: <1475247721-30670-1-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <3e440431-716c-ca57-0127-72dee9b7b3b2@redhat.com> Date: Fri, 30 Sep 2016 10:47:26 -0500 MIME-Version: 1.0 In-Reply-To: <1475247721-30670-1-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="X2sXqpAUmqhVwubAOFvmjHTI3sP9Kwpdx" Subject: Re: [Qemu-devel] [PATCH] char: fix missing return in error path for chardev TLS init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Paolo Bonzini , qemu-stable@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --X2sXqpAUmqhVwubAOFvmjHTI3sP9Kwpdx From: Eric Blake To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Paolo Bonzini , qemu-stable@nongnu.org Message-ID: <3e440431-716c-ca57-0127-72dee9b7b3b2@redhat.com> Subject: Re: [Qemu-devel] [PATCH] char: fix missing return in error path for chardev TLS init References: <1475247721-30670-1-git-send-email-berrange@redhat.com> In-Reply-To: <1475247721-30670-1-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/30/2016 10:02 AM, Daniel P. Berrange wrote: > If the qio_channel_tls_new_(server|client) methods fail, > we disconnect the client. Unfortunately a missing return > means we then go on to try and run the TLS handshake on > a NULL I/O channel. This gives predictably segfaulty > results. >=20 > The main way to trigger this is to request a bogus TLS > priority string for the TLS credentials. e.g. >=20 > -object tls-creds-x509,id=3Dtls0,priority=3Dwibble,... >=20 > Most other ways appear impossible to trigger except > perhaps if OOM conditions cause gnutls initialization > to fail. >=20 > Signed-off-by: Daniel P. Berrange > --- > qemu-char.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --X2sXqpAUmqhVwubAOFvmjHTI3sP9Kwpdx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX7okOAAoJEKeha0olJ0NqBsgH/2HQ2mF+YEZd0LulmbQCjpMk HUtLVRvsBbo3B9QQ3bgO6hZGhMlqezLKjmpQ9DOfgZhXLyIzVvkCIlXzEYYFyklQ NAFESRm9xUMzU1z4X1yvbpkycLNxyhqfD0ozgKGNnLOZR5ICcjaofHefDLZ0iVZW S4E7EhKh4/ZaV/sPa+bDYXkJroenjjJu9GcVDw+/n6zfa1VSEKtbsSGV6fuzdODs 6Zf5y2Cfv7corX2S11vmRmlKeeJbegY9/sBIYifU1XrvyNeZGqhnojmDrejgbpLw EVlDabh2kSMZMWN1vaQa/vOI+1VUnL7XRghjlh4j/fKICokhxRI0NxuoLe3h2kM= =kjmu -----END PGP SIGNATURE----- --X2sXqpAUmqhVwubAOFvmjHTI3sP9Kwpdx--