[openssh-commits] [openssh] 02/02: upstream: regression test for find-principals NULL deref; from Fabian

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Jan 5 15:12:53 AEDT 2022


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

djm pushed a commit to branch master
in repository openssh.

commit 37a14249ec993599a9051731e4fb0ac5e976aec1
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Wed Jan 5 04:10:39 2022 +0000

    upstream: regression test for find-principals NULL deref; from Fabian
    
    Stelzer
    
    OpenBSD-Regress-ID: f845a8632a5a7d5ae26978004c93e796270fd3e5
---
 regress/sshsig.sh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/regress/sshsig.sh b/regress/sshsig.sh
index 732b3bf5..40aa0c38 100644
--- a/regress/sshsig.sh
+++ b/regress/sshsig.sh
@@ -1,4 +1,4 @@
-#	$OpenBSD: sshsig.sh,v 1.11 2021/11/27 07:23:35 djm Exp $
+#	$OpenBSD: sshsig.sh,v 1.12 2022/01/05 04:10:39 djm Exp $
 #	Placed in the Public Domain.
 
 tid="sshsig"
@@ -208,6 +208,14 @@ for t in $SIGNKEYS; do
 	${SSHKEYGEN} -vvv -Y find-principals -s $sigfile -f $OBJ/allowed_signers >/dev/null 2>&1 && \
 		fail "succeeded finding principal with invalid signers file"
 
+	# find-principals with a configured namespace but none on command-line
+	(printf "$sig_principal " ;
+	 printf "namespaces=\"test1,test2\" ";
+	 cat $pubkey) > $OBJ/allowed_signers
+	${SSHKEYGEN} -vvv -Y find-principals -s $sigfile \
+	    -f $OBJ/allowed_signers >/dev/null 2>&1 || \
+		fail "failed finding principal when namespaces are configured"
+
 	# Check signing keys using ssh-agent.
 	${SSHADD} -D >/dev/null 2>&1 # Remove all previously-loaded keys.
 	${SSHADD} ${privkey} > /dev/null 2>&1 || fail "ssh-add failed"

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


More information about the openssh-commits mailing list