summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2006-01-31 10:23:23 +0000
committerdjm <djm@openbsd.org>2006-01-31 10:23:23 +0000
commit63a6ece597e3b007bd33eb5e4039d1514afff918 (patch)
tree7cdce4ab65703fe938ed8d9532c345d08b550adb
parentfix local arbitrary command execution vulnerability on local/local and (diff)
downloadwireguard-openbsd-63a6ece597e3b007bd33eb5e4039d1514afff918.tar.xz
wireguard-openbsd-63a6ece597e3b007bd33eb5e4039d1514afff918.zip
regression test for CVE-2006-0225 written by dtucker@
-rw-r--r--regress/usr.bin/ssh/scp.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/regress/usr.bin/ssh/scp.sh b/regress/usr.bin/ssh/scp.sh
index 10eb58141c6..f82b988f475 100644
--- a/regress/usr.bin/ssh/scp.sh
+++ b/regress/usr.bin/ssh/scp.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: scp.sh,v 1.5 2006/01/27 06:49:21 djm Exp $
+# $OpenBSD: scp.sh,v 1.6 2006/01/31 10:23:23 djm Exp $
# Placed in the Public Domain.
tid="scp"
@@ -75,6 +75,13 @@ cp ${DATA} ${DIR}/copy
$SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed"
diff -rN ${DIR} ${DIR2} || fail "corrupted copy"
+verbose "$tid: shell metacharacters"
+scpclean
+(cd ${DIR} && \
+ touch '`touch metachartest`' && \
+ $SCP $scpopts *metachar* ${DIR2} 2>/dev/null; \
+ [ ! -f metachartest ] ) || fail "shell metacharacters"
+
if [ ! -z "$SUDO" ]; then
verbose "$tid: skipped file after scp -p with failed chown+utimes"
scpclean