From nobody Wed May 8 15:28:10 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 1505886187244602.994270906118; Tue, 19 Sep 2017 22:43:07 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 803005F723; Wed, 20 Sep 2017 05:43:04 +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 CAB326061E; Wed, 20 Sep 2017 05:42:58 +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 8D9CB410B2; Wed, 20 Sep 2017 05:42:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v8K4xIQs015173 for ; Wed, 20 Sep 2017 00:59:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4E9A15D983; Wed, 20 Sep 2017 04:59:18 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B9395D9CB; Wed, 20 Sep 2017 04:59:16 +0000 (UTC) Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) (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 5266F7D0CB; Wed, 20 Sep 2017 04:59:15 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id e69so761910pfg.4; Tue, 19 Sep 2017 21:59:15 -0700 (PDT) Received: from localhost.localdomain.localdomain ([24.6.85.152]) by smtp.gmail.com with ESMTPSA id u184sm6164453pfb.126.2017.09.19.21.59.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Sep 2017 21:59:13 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 803005F723 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx10.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 803005F723 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kwDHr/37" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5266F7D0CB Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ashmit602@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5266F7D0CB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=28V4Vp4BkbagDO8Yqn09RE2udQM394YsP98R/LzHCgY=; b=kwDHr/37Ab/j4T2WSlR4VnkZbzfZ62Naskb5Vq+o0Nl9qB5gEj9BQ0kRIpGCng3Evd WpCY8Z52+kshCVUoX/FuUvSx6FbH25gBLh6pPpGBsLfXnOJdPKuV4QDQ5tLPC9LTeAOF V/unLOBMEVyRBW5orBDyd5duSv8sqmglG2MSbjrj57G0zK84NEUKA8mG3qceP/aKb+5d 3xVhhKB/nXzpGYXLk6wptKhvHqMn4eMBVyagDAcmEKVb8oLKVqdCy2OhiBymEAhh9HBT ANdORykB1NYu3EtVkSoE37H9avM+h0clQw9VvrxdLO9Ob5eMVXn9rrSeEgn3Mz4qMdUH EtwQ== 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=28V4Vp4BkbagDO8Yqn09RE2udQM394YsP98R/LzHCgY=; b=HR0dOJFn0BXHmQdGHedHuodlSUUO7Qp1o7ReoryWH0MWtzuoYdHo2mFx7NVrW/OEk2 JhohxGUDOnsp+EHCG8lxQ5FKxe0G3eW8rkcDRh8lmVUyf8tR4XL5+0sY6xW8eia2d8xb 3OYsPGN/Pp79FIkbHtvXG8mE/ASGlli8g4tj0TIjp2Bc2uR7XKvRtqVcx8/C7PB+YJ6E IMFmVZ34aDAM7m031Ah9l/K1sFjJQcJ7t8o2FDwwh3UC+Yio298ueXW80W0ZdKu/raN1 ZGlOwfYjfJu2zI4ppH6c4c+3OIhLWXI8gkzADrJp9UM2k8KjXnFrzg8mhRIPZgVDtHQN 2MMQ== X-Gm-Message-State: AHPjjUhaoh2pSboI1hKANRwEemq3ElYB805EiOJjKt1FFPagJORo0aIf azavKu68x69e/47h0i9JOLLZsA== X-Google-Smtp-Source: AOwi7QBf7/sU0QWuCshL9M+kH2RHUh26nP2yPw94qxNTczC18Sc2XQkxHbjOQMs4OblNTNcA8z1MAw== X-Received: by 10.84.232.200 with SMTP id x8mr856214plm.347.1505883554496; Tue, 19 Sep 2017 21:59:14 -0700 (PDT) From: Ashish Mittal To: libvir-list@redhat.com, jferlan@redhat.com, pkrempa@redhat.com Date: Tue, 19 Sep 2017 21:58:34 -0700 Message-Id: <1505883514-26215-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.27]); Wed, 20 Sep 2017 04:59:15 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 20 Sep 2017 04:59:15 +0000 (UTC) for IP:'209.85.192.195' DOMAIN:'mail-pf0-f195.google.com' HELO:'mail-pf0-f195.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.195 mail-pf0-f195.google.com 209.85.192.195 mail-pf0-f195.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.27 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Ashish Mittal Subject: [libvirt] [PATCH] 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 20 Sep 2017 05:43:06 +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..df58ecc 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, qemuCa= ps, + 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