[openssh-commits] [openssh] 01/02: upstream: Don't leak SK device. Patch from Pedro Martelletto via

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Apr 29 13:26:29 AEST 2022


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 3e26b3a6eebcee27be177207cc0846fb844b7a56
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Fri Apr 29 03:16:48 2022 +0000

    upstream: Don't leak SK device. Patch from Pedro Martelletto via
    
    github PR#316. ok djm@
    
    OpenBSD-Commit-ID: 17d11327545022e727d95fd08b213171c5a4585d
---
 sk-usbhid.c     | 3 ++-
 ssh-sk-helper.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sk-usbhid.c b/sk-usbhid.c
index 2d36ac33..2d58c783 100644
--- a/sk-usbhid.c
+++ b/sk-usbhid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sk-usbhid.c,v 1.38 2022/02/07 01:25:12 djm Exp $ */
+/* $OpenBSD: sk-usbhid.c,v 1.39 2022/04/29 03:16:48 dtucker Exp $ */
 /*
  * Copyright (c) 2019 Markus Friedl
  * Copyright (c) 2020 Pedro Martelletto
@@ -1393,6 +1393,7 @@ sk_load_resident_keys(const char *pin, struct sk_option **options,
 		freezero(rks[i]->user_id, rks[i]->user_id_len);
 		freezero(rks[i], sizeof(*rks[i]));
 	}
+	free(device);
 	free(rks);
 	return ret;
 }
diff --git a/ssh-sk-helper.c b/ssh-sk-helper.c
index b1d22631..bd9b410a 100644
--- a/ssh-sk-helper.c
+++ b/ssh-sk-helper.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-sk-helper.c,v 1.12 2021/10/28 02:54:18 djm Exp $ */
+/* $OpenBSD: ssh-sk-helper.c,v 1.13 2022/04/29 03:16:48 dtucker Exp $ */
 /*
  * Copyright (c) 2019 Google LLC
  *
@@ -265,6 +265,7 @@ process_load_resident(struct sshbuf *req)
 	sshsk_free_resident_keys(srks, nsrks);
 	sshbuf_free(kbuf);
 	free(provider);
+	free(device);
 	if (pin != NULL)
 		freezero(pin, strlen(pin));
 	return resp;

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list