[PATCH 01/10] qemu: conf: Clear spice/vnc passwords from memory when freeing conf object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We should not keep secrets randomly on the heap.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_conf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 42122dcd97..f23a0c0222 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -363,12 +363,12 @@ static void virQEMUDriverConfigDispose(void *obj)
     VIR_FREE(cfg->vncTLSx509certdir);
     VIR_FREE(cfg->vncTLSx509secretUUID);
     VIR_FREE(cfg->vncListen);
-    VIR_FREE(cfg->vncPassword);
+    VIR_DISPOSE_STRING(cfg->vncPassword);
     VIR_FREE(cfg->vncSASLdir);

     VIR_FREE(cfg->spiceTLSx509certdir);
     VIR_FREE(cfg->spiceListen);
-    VIR_FREE(cfg->spicePassword);
+    VIR_DISPOSE_STRING(cfg->spicePassword);
     VIR_FREE(cfg->spiceSASLdir);

     VIR_FREE(cfg->chardevTLSx509certdir);
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux