From 0081f85593fa1ca77f182e63e756333a1421943f Mon Sep 17 00:00:00 2001 From: djm Date: Fri, 14 Jan 2022 03:35:10 +0000 Subject: [PATCH] ssh-sk: free a resident key's user id From Pedro Martelletto; ok dtucker & me --- usr.bin/ssh/ssh-sk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/ssh/ssh-sk.c b/usr.bin/ssh/ssh-sk.c index d28c5717486..ad5e6e9aa41 100644 --- a/usr.bin/ssh/ssh-sk.c +++ b/usr.bin/ssh/ssh-sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-sk.c,v 1.37 2021/11/02 22:56:40 djm Exp $ */ +/* $OpenBSD: ssh-sk.c,v 1.38 2022/01/14 03:35:10 djm Exp $ */ /* * Copyright (c) 2019 Google LLC * @@ -723,6 +723,7 @@ sshsk_free_sk_resident_keys(struct sk_resident_key **rks, size_t nrks) return; for (i = 0; i < nrks; i++) { free(rks[i]->application); + freezero(rks[i]->user_id, rks[i]->user_id_len); freezero(rks[i]->key.key_handle, rks[i]->key.key_handle_len); freezero(rks[i]->key.public_key, rks[i]->key.public_key_len); freezero(rks[i]->key.signature, rks[i]->key.signature_len); -- 2.20.1