From nobody Wed Apr 24 04:58:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1505909263562695.9705264452663; Wed, 20 Sep 2017 05:07:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0C18E81E1F; Wed, 20 Sep 2017 12:07:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C186F5C888; Wed, 20 Sep 2017 12:07:41 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1796662D08; Wed, 20 Sep 2017 12:07:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v8KC39Lh027142 for ; Wed, 20 Sep 2017 08:03:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 541EE61352; Wed, 20 Sep 2017 12:03:09 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9884C6031A; Wed, 20 Sep 2017 12:03:07 +0000 (UTC) Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B1DCF7F3F3; Wed, 20 Sep 2017 12:03:06 +0000 (UTC) Received: by mail-pf0-f196.google.com with SMTP id f84so1111932pfj.3; Wed, 20 Sep 2017 05:03:06 -0700 (PDT) Received: from localhost.localdomain.localdomain ([24.6.85.152]) by smtp.gmail.com with ESMTPSA id w82sm8013169pfa.69.2017.09.20.05.03.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Sep 2017 05:03:05 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0C18E81E1F Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0C18E81E1F Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ofmm/XBj" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B1DCF7F3F3 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ashmit602@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B1DCF7F3F3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=0slpFRpJ4cik6ns6pWAu0bixRvWyb21DtkgJ0zBYJtc=; b=Ofmm/XBjNlhAV2YPX+FXwikTWk5Fbu9H9Uzil9RPLBS6+id+BqWrzru9JcB2MpV/IK 0ezHzQVEbmZuObbEL/DZ7qjdhT+I0fxurcNQ4tpd6uyZpDBxzNbRgI02LdmNIK1w+mmY iIjJTE/qe3NWZOadQarLlZq24VmEqdEIuuVlHrKw4YGGnzoL/wLBIs0Dn6mRKLd6Pwi7 I4fjR4IqMAoASNkFWMaoMheQDhHOmAdU5hBd0HF4/FPlkQv5w9j6Fcu1Y086OYZsIEJ0 RlHHo2kkzbvITX9FuLhtZWuevREXNxDIZ85fPL8XMwbELMDMl3I2rOAtX0TdrPm7LqtR Jegw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0slpFRpJ4cik6ns6pWAu0bixRvWyb21DtkgJ0zBYJtc=; b=VVS5PYjUg6ODDIkRbwiLwQWksk4NK/lQ/hk8wwjiQbtHmP8NyDD/2nwXWOXD0XOOBt nAMrH2gNdpnWAG+6C3WFj01RyQ3kUo2dDJwjpF0QxJw1c9YWlE0B0ck0LeuuZ73xL7l6 Zd0j+6VnOWl9KZNLZBQVyuUBcRxOmrlT5tI4n1rtHYYoRUxaCEpqHnwT8MPidctvCMiK a36/iTrf/VwxYkGpNLGz9LnKZ3C2bpNfzScCzgmDEvCRLG5x0CMCTmn51nMv2/2sT9VG oMRLKL8bH346sxPIhEFGmqkRFwBgvgQxGEuyjNnvD/phqnaHxHQ2Eu32A6HJ8dWlyQTc UyTQ== X-Gm-Message-State: AHPjjUgIZzBvi7zOs18aI1ifMjPWtFdm1/Jz0Omhe4bcoU9wh15EphEC QDrkBUNbFmnlR+N2Kbv5gL6jjw== X-Google-Smtp-Source: AOwi7QAUrxCdXB4kBMa3pylgbkWPBiaKFEhfQyd+f5GJQC0MAoGmZumpY9wPa9g9nkOhPZMUyHZX9A== X-Received: by 10.84.136.34 with SMTP id 31mr1891040plk.174.1505908985963; Wed, 20 Sep 2017 05:03:05 -0700 (PDT) From: Ashish Mittal To: libvir-list@redhat.com, jferlan@redhat.com, pkrempa@redhat.com, eskultet@redhat.com Date: Wed, 20 Sep 2017 05:02:36 -0700 Message-Id: <1505908956-106770-1-git-send-email-ashmit602@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 20 Sep 2017 12:03:06 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 20 Sep 2017 12:03:06 +0000 (UTC) for IP:'209.85.192.196' DOMAIN:'mail-pf0-f196.google.com' HELO:'mail-pf0-f196.google.com' FROM:'ashmit602@gmail.com' RCPT:'' X-RedHat-Spam-Score: -2.16 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.192.196 mail-pf0-f196.google.com 209.85.192.196 mail-pf0-f196.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Ashish Mittal Subject: [libvirt] [PATCH v2] Fix libvirtd crash in qemuDomainGetTLSObjects X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 20 Sep 2017 12:07:42 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Passing a NULL value for the argument secAlias to the function qemuDomainGetTLSObjects causes a segmentation fault. Thread 3 "libvirtd" received signal SIGSEGV, Segmentation fault. 0x00007f97c9c42a3d in qemuDomainGetTLSObjects (..., secAlias=3D0x0) at qemu/qemu_hotplug.c:1736 Changed code to not dereference a NULL secAlias. Signed-off-by: Ashish Mittal --- src/qemu/qemu_hotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 7dd6e5f..9ecdf0a 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1643,7 +1643,8 @@ qemuDomainGetTLSObjects(virQEMUCapsPtr qemuCaps, } =20 if (qemuBuildTLSx509BackendProps(tlsCertdir, tlsListen, tlsVerify, - *secAlias, qemuCaps, tlsProps) < 0) + secAlias ? *secAlias : NULL, qemuCaps, + tlsProps) < 0) return -1; =20 if (!(*tlsAlias =3D qemuAliasTLSObjFromSrcAlias(srcAlias))) --=20 2.5.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list