DragonFlyBSD Kernel Audit
DF-0464 / fix.diff
← back to finding ↓ download raw
diff --git a/net/wg/wg_noise.c b/net/wg/wg_noise.c
--- a/net/wg/wg_noise.c
+++ b/net/wg/wg_noise.c
@@ -675,8 +675,8 @@
 {
 	lockmgr(&r->r_handshake_lock, LK_EXCLUSIVE);
 	if (noise_remote_index_remove(r->r_local, r))
-		bzero(&r->r_handshake, sizeof(r->r_handshake));
-	bzero(&r->r_last_sent, sizeof(r->r_last_sent));
+		explicit_bzero(&r->r_handshake, sizeof(r->r_handshake));
+	explicit_bzero(&r->r_last_sent, sizeof(r->r_last_sent));
 	lockmgr(&r->r_handshake_lock, LK_RELEASE);
 }