Skip to content

Commit 0eab6d5

Browse files
authored
Merge pull request #713 from tgauth/sync-with-upstream-2
Sync with upstream 9.7
2 parents 56d415a + 03ae103 commit 0eab6d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+977
-436
lines changed

.github/configs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ case "$config" in
164164
libressl-*)
165165
LIBCRYPTOFLAGS="--with-ssl-dir=/opt/libressl --with-rpath=-Wl,-rpath,"
166166
;;
167+
putty-*)
168+
CONFIGFLAGS="--with-plink=/usr/local/bin/plink --with-puttygen=/usr/local/bin/puttygen"
169+
# We don't need to rerun the regular tests, just the interop ones.
170+
TEST_TARGET=interop-tests
171+
;;
167172
openssl-*)
168173
LIBCRYPTOFLAGS="--with-ssl-dir=/opt/openssl --with-rpath=-Wl,-rpath,"
169174
# OpenSSL 1.1.1 specifically has a bug in its RNG that breaks reexec
@@ -269,20 +274,22 @@ case "${TARGET_HOST}" in
269274
;;
270275
minix3)
271276
CONFIGFLAGS="${CONFIGFLAGS} --disable-security-key"
277+
# Unix domain sockets don't work quite like we expect, so also
278+
# disable FD passing (and thus multiplexing).
279+
CONFIGFLAGS="${CONFIGFLAGS} --disable-fd-passing"
272280
LIBCRYPTOFLAGS="--without-openssl"
281+
273282
# Minix does not have a loopback interface so we have to skip any
274283
# test that relies on one.
275284
# Also, Minix seems to be very limited in the number of select()
276285
# calls that can be operating concurrently, so prune additional tests for that.
277286
T="addrmatch agent-restrict brokenkeys cfgmatch cfgmatchlisten cfgparse
278-
connect connect-uri exit-status forwarding hostkey-agent
279-
key-options keyscan knownhosts-command login-timeout
287+
connect connect-uri dynamic-forward exit-status forwarding
288+
forward-control
289+
hostkey-agent key-options keyscan knownhosts-command login-timeout
280290
reconfigure reexec rekey scp scp-uri scp3 sftp sftp-badcmds
281291
sftp-batch sftp-cmds sftp-glob sftp-perm sftp-uri stderr-data
282292
transfer"
283-
# Unix domain sockets don't work quite like we expect, so also skip any tests
284-
# that use multiplexing.
285-
T="$T connection-timeout dynamic-forward forward-control multiplex"
286293
SKIP_LTESTS="$(echo $T)"
287294
TEST_TARGET=t-exec
288295
SUDO=""
@@ -320,6 +327,10 @@ case "$host" in
320327
# modern versions don't ship with libcrypto.
321328
LIBCRYPTOFLAGS="--without-openssl"
322329
TEST_TARGET=t-exec
330+
331+
# On some OS X runners we can't write to /var/empty.
332+
CONFIGFLAGS="${CONFIGFLAGS} --with-privsep-path=/usr/local/empty"
333+
323334
case "$host" in
324335
*-darwin22.*)
325336
# sudo -S nobody doesn't work on macos 13 for some reason.

.github/setup_ci.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ for TARGET in $TARGETS; do
142142
INSTALL_BORINGSSL=1
143143
PACKAGES="${PACKAGES} cmake ninja-build"
144144
;;
145+
putty-*)
146+
INSTALL_PUTTY=$(echo "${TARGET}" | cut -f2 -d-)
147+
PACKAGES="${PACKAGES} cmake"
148+
;;
145149
valgrind*)
146150
PACKAGES="$PACKAGES valgrind"
147151
;;
@@ -241,3 +245,25 @@ if [ ! -z "${INSTALL_ZLIB}" ]; then
241245
cd ${HOME}/zlib && ./configure && make &&
242246
sudo make install prefix=/opt/zlib)
243247
fi
248+
249+
if [ ! -z "${INSTALL_PUTTY}" ]; then
250+
ver="${INSTALL_PUTTY}"
251+
case "${INSTALL_PUTTY}" in
252+
snapshot)
253+
tarball=putty.tar.gz
254+
(cd /tmp && wget https://tartarus.org/~simon/putty-snapshots/${tarball})
255+
;;
256+
*)
257+
tarball=putty-${ver}.tar.gz
258+
(cd /tmp && wget https://the.earth.li/~sgtatham/putty/${ver}/${tarball})
259+
;;
260+
esac
261+
(cd ${HOME} && tar xfz /tmp/${tarball} && cd putty-*
262+
if [ -f CMakeLists.txt ]; then
263+
cmake . && cmake --build . && sudo cmake --build . --target install
264+
else
265+
./configure && make && sudo make install
266+
fi
267+
)
268+
/usr/local/bin/plink -V
269+
fi

.github/workflows/c-cpp.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,32 @@ jobs:
5959
- { target: ubuntu-latest, config: libressl-3.5.3 }
6060
- { target: ubuntu-latest, config: libressl-3.6.1 }
6161
- { target: ubuntu-latest, config: libressl-3.7.2 }
62-
- { target: ubuntu-latest, config: libressl-3.8.2 }
62+
- { target: ubuntu-latest, config: libressl-3.8.3 }
63+
- { target: ubuntu-latest, config: libressl-3.9.0 }
6364
- { target: ubuntu-latest, config: openssl-master }
6465
- { target: ubuntu-latest, config: openssl-noec }
6566
- { target: ubuntu-latest, config: openssl-1.1.1 }
6667
- { target: ubuntu-latest, config: openssl-1.1.1t }
6768
- { target: ubuntu-latest, config: openssl-1.1.1w }
6869
- { target: ubuntu-latest, config: openssl-3.0.0 }
69-
- { target: ubuntu-latest, config: openssl-3.0.12 }
70+
- { target: ubuntu-latest, config: openssl-3.0.13 }
7071
- { target: ubuntu-latest, config: openssl-3.1.0 }
71-
- { target: ubuntu-latest, config: openssl-3.1.4 }
72-
- { target: ubuntu-latest, config: openssl-3.2.0 }
72+
- { target: ubuntu-latest, config: openssl-3.1.5 }
73+
- { target: ubuntu-latest, config: openssl-3.2.1 }
7374
- { target: ubuntu-latest, config: openssl-1.1.1_stable }
7475
- { target: ubuntu-latest, config: openssl-3.0 } # stable branch
7576
- { target: ubuntu-latest, config: openssl-3.2 } # stable branch
77+
- { target: ubuntu-latest, config: putty-0.71 }
78+
- { target: ubuntu-latest, config: putty-0.72 }
79+
- { target: ubuntu-latest, config: putty-0.73 }
80+
- { target: ubuntu-latest, config: putty-0.74 }
81+
- { target: ubuntu-latest, config: putty-0.75 }
82+
- { target: ubuntu-latest, config: putty-0.76 }
83+
- { target: ubuntu-latest, config: putty-0.77 }
84+
- { target: ubuntu-latest, config: putty-0.78 }
85+
- { target: ubuntu-latest, config: putty-0.79 }
86+
- { target: ubuntu-latest, config: putty-0.80 }
87+
- { target: ubuntu-latest, config: putty-snapshot }
7688
- { target: ubuntu-latest, config: zlib-develop }
7789
- { target: ubuntu-22.04, config: pam }
7890
- { target: ubuntu-22.04, config: krb5 }

.github/workflows/selfhosted.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272
- { target: fbsd14, config: pam, host: libvirt }
7373
- { target: nbsd8, config: pam, host: libvirt }
7474
- { target: nbsd9, config: pam, host: libvirt }
75+
- { target: nbsd10, config: pam, host: libvirt }
7576
# VMs with persistent disks that have their own runner.
7677
- { target: win10, config: default, host: win10 }
7778
- { target: win10, config: cygwin-release, host: win10 }

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ survey.sh
1919
**/*.so
2020
**/*.out
2121
**/*.a
22+
**/*.un~
23+
**/.*.swp
2224
autom4te.cache/
2325
scp
2426
sftp

.skipped-commit-ids

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
509bb19bb9762a4b3b589af98bac2e730541b6d4 clean sshd random relinking kit
12
5317f294d63a876bfc861e19773b1575f96f027d remove libssh from makefiles
23
a337e886a49f96701ccbc4832bed086a68abfa85 Makefile changes
34
f2c9feb26963615c4fece921906cf72e248b61ee more Makefile
@@ -27,6 +28,7 @@ cc12a9029833d222043aecd252d654965c351a69 moduli-gen Makefile
2728
f9a0726d957cf10692a231996a1f34e7f9cdfeb0 moduli update
2829
1e0a2692b7e20b126dda60bf04999d1d30d959d8 sshd relinking makefile changes
2930
e1dc11143f83082e3154d6094f9136d0dc2637ad more relinking makefile tweaks
31+
5a636f6ca7f25bfe775df4952f7aac90a7fcbbee moduli update
3032

3133
Old upstream tree:
3234

PROTOCOL

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,33 +137,34 @@ than as a named global or channel request to allow pings with very
137137
short packet lengths, which would not be possible with other
138138
approaches.
139139

140-
1.9 transport: strict key exchange extension
140+
1.10 transport: strict key exchange extension
141141

142142
OpenSSH supports a number of transport-layer hardening measures under
143143
a "strict KEX" feature. This feature is signalled similarly to the
144144
RFC8308 ext-info feature: by including a additional algorithm in the
145-
initiial SSH2_MSG_KEXINIT kex_algorithms field. The client may append
145+
initial SSH2_MSG_KEXINIT kex_algorithms field. The client may append
146146
"[email protected]" to its kex_algorithms and the server
147147
may append "[email protected]". These pseudo-algorithms
148148
are only valid in the initial SSH2_MSG_KEXINIT and MUST be ignored
149149
if they are present in subsequent SSH2_MSG_KEXINIT packets.
150150

151151
When an endpoint that supports this extension observes this algorithm
152152
name in a peer's KEXINIT packet, it MUST make the following changes to
153-
the the protocol:
154-
155-
a) During initial KEX, terminate the connection if any unexpected or
156-
out-of-sequence packet is received. This includes terminating the
157-
connection if the first packet received is not SSH2_MSG_KEXINIT.
158-
Unexpected packets for the purpose of strict KEX include messages
159-
that are otherwise valid at any time during the connection such as
160-
SSH2_MSG_DEBUG and SSH2_MSG_IGNORE.
153+
the protocol:
154+
155+
a) During initial KEX, terminate the connection if out-of-sequence
156+
packet or any message that is not strictly required by KEX is
157+
received. This includes terminating the connection if the first
158+
packet received is not SSH2_MSG_KEXINIT. Unexpected packets for
159+
the purpose of strict KEX include messages that are otherwise
160+
valid at any time during the connection such as SSH2_MSG_DEBUG,
161+
SSH2_MSG_IGNORE or SSH2_MSG_UNIMPLEMENTED.
161162
b) After sending or receiving a SSH2_MSG_NEWKEYS message, reset the
162163
packet sequence number to zero. This behaviour persists for the
163164
duration of the connection (i.e. not just the first
164165
SSH2_MSG_NEWKEYS).
165166

166-
1.10 transport: SSH2_MSG_EXT_INFO during user authentication
167+
1.11 transport: SSH2_MSG_EXT_INFO during user authentication
167168

168169
This protocol extension allows the SSH2_MSG_EXT_INFO to be sent
169170
during user authentication. RFC8308 does allow a second
@@ -735,6 +736,7 @@ identifiers:
735736
The server will reply with a SSH_FXP_EXTENDED_REPLY:
736737

737738
byte SSH_FXP_EXTENDED_REPLY
739+
uint32 id
738740
string usernames
739741
string groupnames
740742

@@ -790,4 +792,4 @@ master instance and later clients.
790792
OpenSSH extends the usual agent protocol. These changes are documented
791793
in the PROTOCOL.agent file.
792794

793-
$OpenBSD: PROTOCOL,v 1.51 2023/12/18 14:45:49 djm Exp $
795+
$OpenBSD: PROTOCOL,v 1.55 2024/01/08 05:05:15 djm Exp $

PROTOCOL.agent

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ with private keys as they are loaded from a PKCS#11 token.
9191
bool certs_only
9292
string certsblob
9393

94-
Where "certsblob" constists of one or more certificates encoded as public
94+
Where "certsblob" consists of one or more certificates encoded as public
9595
key blobs:
9696

9797
string[] certificates
@@ -112,4 +112,4 @@ A SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED will return SSH_AGENT_SUCCESS
112112
if any key (plain private or certificate) was successfully loaded, or
113113
SSH_AGENT_FAILURE if no key was loaded.
114114

115-
$OpenBSD: PROTOCOL.agent,v 1.21 2023/12/18 14:46:56 djm Exp $
115+
$OpenBSD: PROTOCOL.agent,v 1.22 2023/12/20 00:06:25 jsg Exp $

PROTOCOL.mux

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ For dynamically allocated listen port the server replies with
188188

189189
7. Requesting closure of port forwards
190190

191-
Note: currently unimplemented (server will always reply with MUX_S_FAILURE).
192-
193191
A client may request the master to close a port forward:
194192

195193
uint32 MUX_C_CLOSE_FWD
@@ -295,4 +293,4 @@ XXX session inspection via master
295293
XXX signals via mux request
296294
XXX list active connections via mux
297295

298-
$OpenBSD: PROTOCOL.mux,v 1.13 2022/01/01 01:55:30 jsg Exp $
296+
$OpenBSD: PROTOCOL.mux,v 1.14 2024/01/08 05:11:18 djm Exp $

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
See https://www.openssh.com/releasenotes.html#9.6p1 for the release
1+
See https://www.openssh.com/releasenotes.html#9.7p1 for the release
22
notes.
33

44
Please read https://www.openssh.com/report.html for bug reporting

0 commit comments

Comments
 (0)