]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: fix use-after-free in ssh-pkcs11; found by hshoexer w/AFL
authormarkus@openbsd.org <markus@openbsd.org>
Fri, 8 Mar 2019 17:24:43 +0000 (17:24 +0000)
committerDamien Miller <djm@mindrot.org>
Mon, 25 Mar 2019 23:20:22 +0000 (10:20 +1100)
OpenBSD-Commit-ID: febce81cca72b71f70513fbee4ff52ca050f675c

ssh-pkcs11.c

index a1a2bab4532c66c0565cd4d5810fe9f53863fe0c..70f06bffe327c7e8786a140eace89fa2bf3e3ed0 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-pkcs11.c,v 1.42 2019/02/04 23:37:54 djm Exp $ */
+/* $OpenBSD: ssh-pkcs11.c,v 1.43 2019/03/08 17:24:43 markus Exp $ */
 /*
  * Copyright (c) 2010 Markus Friedl.  All rights reserved.
  * Copyright (c) 2014 Pedro Martelletto. All rights reserved.
@@ -1124,6 +1124,7 @@ pkcs11_fetch_certs(struct pkcs11_provider *p, CK_ULONG slotidx,
                        break;
                default:
                        /* XXX print key type? */
+                       key = NULL;
                        error("skipping unsupported certificate type");
                }
 
@@ -1225,6 +1226,7 @@ pkcs11_fetch_keys(struct pkcs11_provider *p, CK_ULONG slotidx,
 #endif /* HAVE_EC_KEY_METHOD_NEW */
                default:
                        /* XXX print key type? */
+                       key = NULL;
                        error("skipping unsupported key type");
                }