summaryrefslogtreecommitdiff
path: root/sbin/vnconfig/vnconfig.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2021-09-22 20:43:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2021-09-22 20:43:17 +0000
commit19f416b7f39cfa2a466f627f2754db69579c13b8 (patch)
treeb6466a20f116901e05a9d0afb93ef3cf593355b4 /sbin/vnconfig/vnconfig.c
parentb2b619d4e72f0dfa586fa4850f30cb3e8490d228 (diff)
if the key is a secret to be cleared with explicit_bzero, then the
length of that key is also a secret, may as well clear it also
Diffstat (limited to 'sbin/vnconfig/vnconfig.c')
-rw-r--r--sbin/vnconfig/vnconfig.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/vnconfig/vnconfig.c b/sbin/vnconfig/vnconfig.c
index cc179e08a74..2af24b51bda 100644
--- a/sbin/vnconfig/vnconfig.c
+++ b/sbin/vnconfig/vnconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnconfig.c,v 1.5 2019/06/28 13:32:46 deraadt Exp $ */
+/* $OpenBSD: vnconfig.c,v 1.6 2021/09/22 20:43:16 deraadt Exp $ */
/*
* Copyright (c) 1993 University of Utah.
* Copyright (c) 1990, 1993
@@ -324,6 +324,7 @@ config(char *file, char *dev, struct disklabel *dp, char *key, size_t keylen)
out:
if (key)
explicit_bzero(key, keylen);
+ explicit_bzero(&vndio.vnd_keylen, sizeof vndio.vnd_keylen);
return (rv == -1);
}