From 72cf345bc2de97a5f60f97a09926b9673ea46704 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 7 Sep 2022 13:09:13 +0200 Subject: [PATCH] Revert "conf: clean up memory containing secrets before freeing" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 password in the cleanup function for virDomainGraphicsAuthDef. This reverts commit 51f8130d78fde3201b49c02b7095ff918b6e658a Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina Reviewed-by: Ján Tomko --- 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', expect YYYY-MM-DDTHH:MM:SS"), validTo); - virSecureEraseString(def->passwd); VIR_FREE(def->passwd); return -1; }