diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/.git-dpm | 4 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | debian/patches/regress-forwarding-race.patch | 115 | ||||
-rw-r--r-- | debian/patches/series | 1 |
4 files changed, 119 insertions, 2 deletions
diff --git a/debian/.git-dpm b/debian/.git-dpm index 002104d0d..1f8d45838 100644 --- a/debian/.git-dpm +++ b/debian/.git-dpm | |||
@@ -1,6 +1,6 @@ | |||
1 | # see git-dpm(1) from git-dpm package | 1 | # see git-dpm(1) from git-dpm package |
2 | ada7edd8b4ec246a0c1c283c5e5956f09d503fbd | 2 | d225c4fe44ad94a30a5033e58594f2bebaa674f2 |
3 | ada7edd8b4ec246a0c1c283c5e5956f09d503fbd | 3 | d225c4fe44ad94a30a5033e58594f2bebaa674f2 |
4 | 971a7653746a6972b907dfe0ce139c06e4a6f482 | 4 | 971a7653746a6972b907dfe0ce139c06e4a6f482 |
5 | 971a7653746a6972b907dfe0ce139c06e4a6f482 | 5 | 971a7653746a6972b907dfe0ce139c06e4a6f482 |
6 | openssh_7.4p1.orig.tar.gz | 6 | openssh_7.4p1.orig.tar.gz |
diff --git a/debian/changelog b/debian/changelog index b69cfe21b..ccb1168ab 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -5,6 +5,7 @@ openssh (1:7.4p1-4) UNRELEASED; urgency=medium | |||
5 | * Make integrity tests more robust against timeouts in the case where the | 5 | * Make integrity tests more robust against timeouts in the case where the |
6 | first test in a series for a given MAC happens to modify the low bytes | 6 | first test in a series for a given MAC happens to modify the low bytes |
7 | of a packet length. | 7 | of a packet length. |
8 | * Fix race conditions in forwarding tests. | ||
8 | 9 | ||
9 | -- Colin Watson <cjwatson@debian.org> Sun, 01 Jan 2017 14:32:26 +0000 | 10 | -- Colin Watson <cjwatson@debian.org> Sun, 01 Jan 2017 14:32:26 +0000 |
10 | 11 | ||
diff --git a/debian/patches/regress-forwarding-race.patch b/debian/patches/regress-forwarding-race.patch new file mode 100644 index 000000000..92d13c82c --- /dev/null +++ b/debian/patches/regress-forwarding-race.patch | |||
@@ -0,0 +1,115 @@ | |||
1 | From d225c4fe44ad94a30a5033e58594f2bebaa674f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Colin Watson <cjwatson@debian.org> | ||
3 | Date: Mon, 2 Jan 2017 14:55:16 +0000 | ||
4 | Subject: Fix race conditions in forwarding tests | ||
5 | |||
6 | The forwarding tests sometimes seem to fail in a way that suggests ports | ||
7 | are in use even though they shouldn't be. Convert more of them to use a | ||
8 | mux socket rather than relying on sleeps in the hope that that makes | ||
9 | behaviour more consistent. | ||
10 | |||
11 | Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=2659 | ||
12 | Patch-Name: regress-forwarding-race.patch | ||
13 | |||
14 | Last-Update: 2017-01-02 | ||
15 | --- | ||
16 | regress/forwarding.sh | 32 +++++++++++++++++++------------- | ||
17 | 1 file changed, 19 insertions(+), 13 deletions(-) | ||
18 | |||
19 | diff --git a/regress/forwarding.sh b/regress/forwarding.sh | ||
20 | index 2539db9b..a1a4b13f 100644 | ||
21 | --- a/regress/forwarding.sh | ||
22 | +++ b/regress/forwarding.sh | ||
23 | @@ -11,7 +11,6 @@ base=33 | ||
24 | last=$PORT | ||
25 | fwd="" | ||
26 | CTL=$OBJ/ctl-sock | ||
27 | -rm -f $CTL | ||
28 | |||
29 | for j in 0 1 2; do | ||
30 | for i in 0 1 2; do | ||
31 | @@ -29,7 +28,8 @@ for p in ${SSH_PROTOCOLS}; do | ||
32 | q=$p | ||
33 | fi | ||
34 | trace "start forwarding, fork to background" | ||
35 | - ${SSH} -$p -F $OBJ/ssh_config -f $fwd somehost sleep 10 | ||
36 | + rm -f $CTL | ||
37 | + ${SSH} -S $CTL -M -$p -F $OBJ/ssh_config -f $fwd somehost sleep 10 | ||
38 | |||
39 | trace "transfer over forwarded channels and check result" | ||
40 | ${SSH} -$q -F $OBJ/ssh_config -p$last -o 'ConnectionAttempts=4' \ | ||
41 | @@ -37,7 +37,7 @@ for p in ${SSH_PROTOCOLS}; do | ||
42 | test -s ${COPY} || fail "failed copy of ${DATA}" | ||
43 | cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}" | ||
44 | |||
45 | - sleep 10 | ||
46 | + ${SSH} -S $CTL -O exit somehost | ||
47 | done | ||
48 | |||
49 | for p in ${SSH_PROTOCOLS}; do | ||
50 | @@ -75,7 +75,8 @@ for p in ${SSH_PROTOCOLS}; do | ||
51 | ${SSH} -$p -F $OBJ/ssh_config -oClearAllForwardings=yes somehost true | ||
52 | |||
53 | trace "clear local forward proto $p" | ||
54 | - ${SSH} -$p -f -F $OBJ/ssh_config -L ${base}01:127.0.0.1:$PORT \ | ||
55 | + rm -f $CTL | ||
56 | + ${SSH} -S $CTL -M -$p -f -F $OBJ/ssh_config -L ${base}01:127.0.0.1:$PORT \ | ||
57 | -oClearAllForwardings=yes somehost sleep 10 | ||
58 | if [ $? != 0 ]; then | ||
59 | fail "connection failed with cleared local forwarding" | ||
60 | @@ -85,10 +86,11 @@ for p in ${SSH_PROTOCOLS}; do | ||
61 | >>$TEST_REGRESS_LOGFILE 2>&1 && \ | ||
62 | fail "local forwarding not cleared" | ||
63 | fi | ||
64 | - sleep 10 | ||
65 | + ${SSH} -S $CTL -O exit somehost | ||
66 | |||
67 | trace "clear remote forward proto $p" | ||
68 | - ${SSH} -$p -f -F $OBJ/ssh_config -R ${base}01:127.0.0.1:$PORT \ | ||
69 | + rm -f $CTL | ||
70 | + ${SSH} -S $CTL -M -$p -f -F $OBJ/ssh_config -R ${base}01:127.0.0.1:$PORT \ | ||
71 | -oClearAllForwardings=yes somehost sleep 10 | ||
72 | if [ $? != 0 ]; then | ||
73 | fail "connection failed with cleared remote forwarding" | ||
74 | @@ -98,7 +100,7 @@ for p in ${SSH_PROTOCOLS}; do | ||
75 | >>$TEST_REGRESS_LOGFILE 2>&1 && \ | ||
76 | fail "remote forwarding not cleared" | ||
77 | fi | ||
78 | - sleep 10 | ||
79 | + ${SSH} -S $CTL -O exit somehost | ||
80 | done | ||
81 | |||
82 | for p in 2; do | ||
83 | @@ -115,6 +117,7 @@ echo "LocalForward ${base}01 127.0.0.1:$PORT" >> $OBJ/ssh_config | ||
84 | echo "RemoteForward ${base}02 127.0.0.1:${base}01" >> $OBJ/ssh_config | ||
85 | for p in ${SSH_PROTOCOLS}; do | ||
86 | trace "config file: start forwarding, fork to background" | ||
87 | + rm -f $CTL | ||
88 | ${SSH} -S $CTL -M -$p -F $OBJ/ssh_config -f somehost sleep 10 | ||
89 | |||
90 | trace "config file: transfer over forwarded channels and check result" | ||
91 | @@ -129,15 +132,18 @@ done | ||
92 | for p in 2; do | ||
93 | trace "transfer over chained unix domain socket forwards and check result" | ||
94 | rm -f $OBJ/unix-[123].fwd | ||
95 | - ${SSH} -f -F $OBJ/ssh_config -R${base}01:[$OBJ/unix-1.fwd] somehost sleep 10 | ||
96 | - ${SSH} -f -F $OBJ/ssh_config -L[$OBJ/unix-1.fwd]:[$OBJ/unix-2.fwd] somehost sleep 10 | ||
97 | - ${SSH} -f -F $OBJ/ssh_config -R[$OBJ/unix-2.fwd]:[$OBJ/unix-3.fwd] somehost sleep 10 | ||
98 | - ${SSH} -f -F $OBJ/ssh_config -L[$OBJ/unix-3.fwd]:127.0.0.1:$PORT somehost sleep 10 | ||
99 | + rm -f $CTL $CTL.[123] | ||
100 | + ${SSH} -S $CTL -M -f -F $OBJ/ssh_config -R${base}01:[$OBJ/unix-1.fwd] somehost sleep 10 | ||
101 | + ${SSH} -S $CTL.1 -M -f -F $OBJ/ssh_config -L[$OBJ/unix-1.fwd]:[$OBJ/unix-2.fwd] somehost sleep 10 | ||
102 | + ${SSH} -S $CTL.2 -M -f -F $OBJ/ssh_config -R[$OBJ/unix-2.fwd]:[$OBJ/unix-3.fwd] somehost sleep 10 | ||
103 | + ${SSH} -S $CTL.3 -M -f -F $OBJ/ssh_config -L[$OBJ/unix-3.fwd]:127.0.0.1:$PORT somehost sleep 10 | ||
104 | ${SSH} -F $OBJ/ssh_config -p${base}01 -o 'ConnectionAttempts=4' \ | ||
105 | somehost cat ${DATA} > ${COPY} | ||
106 | test -s ${COPY} || fail "failed copy ${DATA}" | ||
107 | cmp ${DATA} ${COPY} || fail "corrupted copy of ${DATA}" | ||
108 | |||
109 | - #wait | ||
110 | - sleep 10 | ||
111 | + ${SSH} -S $CTL -O exit somehost | ||
112 | + ${SSH} -S $CTL.1 -O exit somehost | ||
113 | + ${SSH} -S $CTL.2 -O exit somehost | ||
114 | + ${SSH} -S $CTL.3 -O exit somehost | ||
115 | done | ||
diff --git a/debian/patches/series b/debian/patches/series index 6f9132c27..61090cc88 100644 --- a/debian/patches/series +++ b/debian/patches/series | |||
@@ -25,3 +25,4 @@ sigstop.patch | |||
25 | systemd-readiness.patch | 25 | systemd-readiness.patch |
26 | debian-config.patch | 26 | debian-config.patch |
27 | regress-integrity-robust.patch | 27 | regress-integrity-robust.patch |
28 | regress-forwarding-race.patch | ||