diff options
author | djm@openbsd.org <djm@openbsd.org> | 2022-01-05 04:02:42 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2022-01-05 15:12:39 +1100 |
commit | eb1f042142fdaba93f6c9560cf6c91ae25f6884a (patch) | |
tree | 06160c08621772da038354e04feedc3669368a3a | |
parent | 8f3b18030579f395eca2181da31a5f945af12a59 (diff) | |
download | openssh-git-eb1f042142fdaba93f6c9560cf6c91ae25f6884a.tar.gz |
upstream: NULL deref when using find-principals when matching an
allowed_signers line that contains a namespace restriction, but no
restriction specified on the command-line; report and fix from Fabian Stelzer
OpenBSD-Commit-ID: 4a201b86afb668c908d1a559c6af456a61f4b145
-rw-r--r-- | sshsig.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: sshsig.c,v 1.26 2021/11/28 07:21:26 djm Exp $ */ +/* $OpenBSD: sshsig.c,v 1.27 2022/01/05 04:02:42 djm Exp $ */ /* * Copyright (c) 2019 Google LLC * @@ -921,7 +921,7 @@ check_allowed_keys_line(const char *path, u_long linenum, char *line, } /* Check whether options preclude the use of this key */ - if (sigopts->namespaces != NULL && + if (sigopts->namespaces != NULL && sig_namespace != NULL && match_pattern_list(sig_namespace, sigopts->namespaces, 0) != 1) { error("%s:%lu: key is not permitted for use in signature " "namespace \"%s\"", path, linenum, sig_namespace); |