From nobody Sat May 18 23:55:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1662549214; cv=none; d=zohomail.com; s=zohoarc; b=VvITR/Qh9eKva5/LHk45fCwo9smnECGDY2o72NXXgqMroT+GfKGnK13TMrdqJPRvYg6pQxCLHKnVo8lVju/u+8BR6zIMPnGY3qaJ3BGYa04mvugwNakNq/rnEuvtKe3jJaVj45Ma8h7GyeliVJCKdviCFtLUOdWWYXfC/sWKA1k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662549214; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=M6VZ/5XyGAG6Q2EGUSll0h1Yo4849OpkKmu2zAhxWfg=; b=Mkngk2DBZibI1vIaydPRAQXRAAou9IRZPXBltc6pUBt1ZcZVVPSih176ZTN1SwLCx7RkGTCMyApiSRGz4/zVCRaRYALod8bXOSbHODhT6snSH75knILMjN/TBuBXSNMcE5QEBuXFcO2RCubRBA7d1Z6UJJGIJtG6sTw2VD3YsBc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1662549214813681.9313213950295; Wed, 7 Sep 2022 04:13:34 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-582-eGfyZfFxOguoNcx3oailFQ-1; Wed, 07 Sep 2022 07:13:29 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7EF8810395C4; Wed, 7 Sep 2022 11:13:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 23BD5141513A; Wed, 7 Sep 2022 11:13:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0B05D1946A48; Wed, 7 Sep 2022 11:13:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9840A1946A40 for ; Wed, 7 Sep 2022 11:13:25 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7A3D61121315; Wed, 7 Sep 2022 11:13:25 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id E1C7A1121314 for ; Wed, 7 Sep 2022 11:13:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662549212; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=M6VZ/5XyGAG6Q2EGUSll0h1Yo4849OpkKmu2zAhxWfg=; b=d3jD0UWY3//sLAxq5ReGCA948sKDlrcBK2rwuZXPFL50S9SiCJANownmt+rnOp5UAfPLde tnvVRowv7Y9pRDdU7Y4zRcamTexxsaIV3X7WrkCsckErbzqiIhZrdC/zJWvMaMSOpwTopN xYii65+cGn2NDvGlgLnKB3QM7Pjfork= X-MC-Unique: eGfyZfFxOguoNcx3oailFQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] Revert "conf: clean up memory containing secrets before freeing" Date: Wed, 7 Sep 2022 13:13:23 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1662549215221100001 Content-Type: text/plain; charset="utf-8" Adding supposedly secure cleanup for secrets in anything related to the XML parser is pointless because there are multiple other un-sanitized copies of the full XML and the XML parser state at the very least. Similarly in case RPC was used to transport the XML the RPC buffers are not sanitized. Additionally this patch was incomplete as it didn't sanitize the the password in the cleanup function for virDomainGraphicsAuthDef. This reverts commit 51f8130d78fde3201b49c02b7095ff918b6e658a. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko Reviewed-by: Pavel Hrdina --- src/conf/domain_conf.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3d1bf18c6c..406c348a00 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -60,7 +60,6 @@ #include "virdomainsnapshotobjlist.h" #include "virdomaincheckpointobjlist.h" #include "virutil.h" -#include "virsecureerase.h" #include "virdomainjob.h" #define VIR_FROM_THIS VIR_FROM_DOMAIN @@ -10862,7 +10861,6 @@ virDomainGraphicsAuthDefParseXML(xmlNodePtr node, virReportError(VIR_ERR_INTERNAL_ERROR, _("cannot parse password validity time '%s', ex= pect YYYY-MM-DDTHH:MM:SS"), validTo); - virSecureEraseString(def->passwd); VIR_FREE(def->passwd); return -1; } --=20 2.37.1