diff options
author | markus@openbsd.org <markus@openbsd.org> | 2019-03-08 17:24:43 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-03-26 10:20:22 +1100 |
commit | 2aee9a49f668092ac5c9d34e904ef7a9722e541d (patch) | |
tree | 2e5bf22e6e05f99165f92a1f0276901db228016d | |
parent | 9edbd7821e6837e98e7e95546cede804dac96754 (diff) |
upstream: fix use-after-free in ssh-pkcs11; found by hshoexer w/AFL
OpenBSD-Commit-ID: febce81cca72b71f70513fbee4ff52ca050f675c
-rw-r--r-- | ssh-pkcs11.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c index a1a2bab45..70f06bffe 100644 --- a/ssh-pkcs11.c +++ b/ssh-pkcs11.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-pkcs11.c,v 1.42 2019/02/04 23:37:54 djm Exp $ */ | 1 | /* $OpenBSD: ssh-pkcs11.c,v 1.43 2019/03/08 17:24:43 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2010 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2010 Markus Friedl. All rights reserved. |
4 | * Copyright (c) 2014 Pedro Martelletto. All rights reserved. | 4 | * Copyright (c) 2014 Pedro Martelletto. All rights reserved. |
@@ -1124,6 +1124,7 @@ pkcs11_fetch_certs(struct pkcs11_provider *p, CK_ULONG slotidx, | |||
1124 | break; | 1124 | break; |
1125 | default: | 1125 | default: |
1126 | /* XXX print key type? */ | 1126 | /* XXX print key type? */ |
1127 | key = NULL; | ||
1127 | error("skipping unsupported certificate type"); | 1128 | error("skipping unsupported certificate type"); |
1128 | } | 1129 | } |
1129 | 1130 | ||
@@ -1225,6 +1226,7 @@ pkcs11_fetch_keys(struct pkcs11_provider *p, CK_ULONG slotidx, | |||
1225 | #endif /* HAVE_EC_KEY_METHOD_NEW */ | 1226 | #endif /* HAVE_EC_KEY_METHOD_NEW */ |
1226 | default: | 1227 | default: |
1227 | /* XXX print key type? */ | 1228 | /* XXX print key type? */ |
1229 | key = NULL; | ||
1228 | error("skipping unsupported key type"); | 1230 | error("skipping unsupported key type"); |
1229 | } | 1231 | } |
1230 | 1232 | ||