Skip to content

Commit 99e3f38

Browse files
committed
fix merge conflicts
2 parents 2bf8005 + 6dfb65d commit 99e3f38

File tree

132 files changed

+8197
-6191
lines changed

Some content is hidden

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

132 files changed

+8197
-6191
lines changed

.depend

Lines changed: 2 additions & 6 deletions
Large diffs are not rendered by default.

.github/ci-status.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml)
2-
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml)
3-
[![Upstream self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml)
1+
master :
2+
[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:master)
3+
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:master)
4+
[![Upstream self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml?query=branch:master)
5+
[![CIFuzz](https://github.com/openssh/openssh-portable/actions/workflows/cifuzz.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/cifuzz.yml)
46
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/openssh.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:openssh)
7+
8+
9.1 :
9+
[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg?branch=V_9_1)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml?query=branch:V_9_1)
10+
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_9_1)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_1)

.github/configs

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99
# LTESTS
1010

1111
config=$1
12+
if [ "$config" = "" ]; then
13+
config="default"
14+
fi
1215

1316
unset CC CFLAGS CPPFLAGS LDFLAGS LTESTS SUDO
1417

15-
TEST_TARGET="tests"
18+
TEST_TARGET="tests compat-tests"
1619
LTESTS=""
1720
SKIP_LTESTS=""
1821
SUDO=sudo # run with sudo by default
@@ -108,7 +111,7 @@ case "$config" in
108111
kitchensink)
109112
CONFIGFLAGS="--with-kerberos5 --with-libedit --with-pam"
110113
CONFIGFLAGS="${CONFIGFLAGS} --with-security-key-builtin --with-selinux"
111-
CONFIGFLAGS="${CONFIGFLAGS} --with-cflags=-DSK_DEBUG"
114+
CFLAGS="-DSK_DEBUG -DSANDBOX_SECCOMP_FILTER_DEBUG"
112115
;;
113116
hardenedmalloc)
114117
CONFIGFLAGS="--with-ldflags=-lhardened_malloc"
@@ -141,6 +144,11 @@ case "$config" in
141144
;;
142145
openssl-*)
143146
LIBCRYPTOFLAGS="--with-ssl-dir=/opt/openssl --with-rpath=-Wl,-rpath,"
147+
# OpenSSL 1.1.1 specifically has a bug in its RNG that breaks reexec
148+
# fallback. See https://bugzilla.mindrot.org/show_bug.cgi?id=3483
149+
if [ "$config" = "openssl-1.1.1" ]; then
150+
SKIP_LTESTS="reexec"
151+
fi
144152
;;
145153
selinux)
146154
CONFIGFLAGS="--with-selinux"
@@ -152,7 +160,7 @@ case "$config" in
152160
LIBCRYPTOFLAGS="--without-openssl"
153161
TEST_TARGET=t-exec
154162
;;
155-
valgrind-[1-4]|valgrind-unit)
163+
valgrind-[1-5]|valgrind-unit)
156164
# rlimit sandbox and FORTIFY_SOURCE confuse Valgrind.
157165
CONFIGFLAGS="--without-sandbox --without-hardening"
158166
CONFIGFLAGS="$CONFIGFLAGS --with-cppflags=-D_FORTIFY_SOURCE=0"
@@ -161,16 +169,19 @@ case "$config" in
161169
export TEST_SSH_ELAPSED_TIMES
162170
# Valgrind slows things down enough that the agent timeout test
163171
# won't reliably pass, and the unit tests run longer than allowed
164-
# by github so split into three separate tests.
165-
tests2="rekey integrity try-ciphers"
172+
# by github so split into separate tests.
173+
tests2="integrity try-ciphers"
166174
tests3="krl forward-control sshsig agent-restrict kextype sftp"
167175
tests4="cert-userkey cert-hostkey kextype sftp-perm keygen-comment percent"
176+
tests5="rekey"
168177
case "$config" in
169178
valgrind-1)
170-
# All tests except agent-timeout (which is flaky under valgrind)
179+
# All tests except agent-timeout (which is flaky under valgrind),
180+
# connection-timeout (which doesn't work since it's so slow)
171181
# and hostbased (since valgrind won't let ssh exec keysign).
172182
# Slow ones are run separately to increase parallelism.
173-
SKIP_LTESTS="agent-timeout hostbased ${tests2} ${tests3} ${tests4}"
183+
SKIP_LTESTS="agent-timeout connection-timeout hostbased"
184+
SKIP_LTESTS="$SKIP_LTESTS ${tests2} ${tests3} ${tests4} ${tests5}"
174185
;;
175186
valgrind-2)
176187
LTESTS="${tests2}"
@@ -181,6 +192,9 @@ case "$config" in
181192
valgrind-4)
182193
LTESTS="${tests4}"
183194
;;
195+
valgrind-5)
196+
LTESTS="${tests5}"
197+
;;
184198
valgrind-unit)
185199
TEST_TARGET="unit USE_VALGRIND=1"
186200
;;
@@ -210,6 +224,10 @@ case "${TARGET_HOST}" in
210224
TEST_TARGET="t-exec TEST_SHELL=bash"
211225
SKIP_LTESTS="rekey sftp"
212226
;;
227+
debian-riscv64)
228+
# This machine is fairly slow, so skip the unit tests.
229+
TEST_TARGET="t-exec"
230+
;;
213231
dfly58*|dfly60*)
214232
# scp 3-way connection hangs on these so skip until sorted.
215233
SKIP_LTESTS=scp3
@@ -227,12 +245,15 @@ case "${TARGET_HOST}" in
227245
# test that relies on one.
228246
# Also, Minix seems to be very limited in the number of select()
229247
# calls that can be operating concurrently, so prune additional tests for that.
230-
T="addrmatch agent-restrict brokenkeys cfgmatch cfgmatchlisten cfgparse connect
231-
connect-uri exit-status forward-control forwarding hostkey-agent
232-
key-options keyscan knownhosts-command login-timeout multiplex
248+
T="addrmatch agent-restrict brokenkeys cfgmatch cfgmatchlisten cfgparse
249+
connect connect-uri exit-status forwarding hostkey-agent
250+
key-options keyscan knownhosts-command login-timeout
233251
reconfigure reexec rekey scp scp-uri scp3 sftp sftp-badcmds
234252
sftp-batch sftp-cmds sftp-glob sftp-perm sftp-uri stderr-data
235253
transfer"
254+
# Unix domain sockets don't work quite like we expect, so also skip any tests
255+
# that use multiplexing.
256+
T="$T connection-timeout dynamic-forward forward-control multiplex"
236257
SKIP_LTESTS="$(echo $T)"
237258
TEST_TARGET=t-exec
238259
SUDO=""
@@ -260,6 +281,8 @@ esac
260281
case "`./config.guess`" in
261282
*cygwin)
262283
SUDO=""
284+
# Don't run compat tests on cygwin as they don't currently compile.
285+
TEST_TARGET="tests"
263286
;;
264287
*-darwin*)
265288
# Unless specified otherwise, build without OpenSSL on Mac OS since

.github/setup_ci.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,29 @@ if [ "yes" = "$INSTALL_FIDO_PPA" ]; then
139139
sudo apt-add-repository -y ppa:yubico/stable
140140
fi
141141

142-
if [ "x" != "x$PACKAGES" ]; then
142+
tries=3
143+
while [ ! -z "$PACKAGES" ] && [ "$tries" -gt "0" ]; do
143144
case "$PACKAGER" in
144145
apt)
145146
sudo apt update -qq
146-
sudo apt install -qy $PACKAGES
147+
if sudo apt install -qy $PACKAGES; then
148+
PACKAGES=""
149+
fi
147150
;;
148151
setup)
149-
/cygdrive/c/setup.exe -q -P `echo "$PACKAGES" | tr ' ' ,`
152+
if /cygdrive/c/setup.exe -q -P `echo "$PACKAGES" | tr ' ' ,`; then
153+
PACKAGES=""
154+
fi
150155
;;
151156
esac
157+
if [ ! -z "$PACKAGES" ]; then
158+
sleep 90
159+
fi
160+
tries=$(($tries - 1))
161+
done
162+
if [ ! -z "$PACKAGES" ]; then
163+
echo "Package installation failed."
164+
exit 1
152165
fi
153166

154167
if [ "${INSTALL_HARDENED_MALLOC}" = "yes" ]; then

.github/workflows/c-cpp.yml

Lines changed: 79 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ name: C/C++ CI
22

33
on:
44
push:
5-
branches: [ master, ci, V_9_0 ]
6-
paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', 'Makefile.in', 'configure.ac' ]
5+
paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ]
76
pull_request:
8-
branches: [ master ]
9-
paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', 'Makefile.in', 'configure.ac' ]
7+
paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ]
108

119
jobs:
1210
ci:
@@ -15,104 +13,109 @@ jobs:
1513
fail-fast: false
1614
matrix:
1715
# First we test all OSes in the default configuration.
18-
os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022]
19-
configs: [default]
16+
target: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022]
17+
config: [default]
2018
# Then we include any extra configs we want to test for specific VMs.
2119
# Valgrind slows things down quite a bit, so start them first.
2220
include:
23-
- { os: windows-2019, configs: cygwin-release }
24-
- { os: windows-2022, configs: cygwin-release }
25-
- { os: ubuntu-20.04, configs: valgrind-1 }
26-
- { os: ubuntu-20.04, configs: valgrind-2 }
27-
- { os: ubuntu-20.04, configs: valgrind-3 }
28-
- { os: ubuntu-20.04, configs: valgrind-4 }
29-
- { os: ubuntu-20.04, configs: valgrind-unit }
30-
- { os: ubuntu-20.04, configs: c89 }
31-
- { os: ubuntu-20.04, configs: clang-6.0 }
32-
- { os: ubuntu-20.04, configs: clang-8 }
33-
- { os: ubuntu-20.04, configs: clang-9 }
34-
- { os: ubuntu-20.04, configs: clang-10 }
35-
- { os: ubuntu-20.04, configs: clang-11 }
36-
- { os: ubuntu-20.04, configs: clang-12-Werror }
37-
- { os: ubuntu-20.04, configs: clang-sanitize-address }
38-
- { os: ubuntu-20.04, configs: clang-sanitize-undefined }
39-
- { os: ubuntu-20.04, configs: gcc-sanitize-address }
40-
- { os: ubuntu-20.04, configs: gcc-sanitize-undefined }
41-
- { os: ubuntu-20.04, configs: gcc-7 }
42-
- { os: ubuntu-20.04, configs: gcc-8 }
43-
- { os: ubuntu-20.04, configs: gcc-10 }
44-
- { os: ubuntu-20.04, configs: gcc-11-Werror }
45-
- { os: ubuntu-20.04, configs: pam }
46-
- { os: ubuntu-20.04, configs: kitchensink }
47-
- { os: ubuntu-20.04, configs: hardenedmalloc }
48-
- { os: ubuntu-20.04, configs: tcmalloc }
49-
- { os: ubuntu-20.04, configs: musl }
50-
- { os: ubuntu-latest, configs: libressl-master }
51-
- { os: ubuntu-latest, configs: libressl-2.2.9 }
52-
- { os: ubuntu-latest, configs: libressl-2.8.3 }
53-
- { os: ubuntu-latest, configs: libressl-3.0.2 }
54-
- { os: ubuntu-latest, configs: libressl-3.2.6 }
55-
- { os: ubuntu-latest, configs: libressl-3.3.6 }
56-
- { os: ubuntu-latest, configs: libressl-3.4.3 }
57-
- { os: ubuntu-latest, configs: libressl-3.5.3 }
58-
- { os: ubuntu-latest, configs: openssl-master }
59-
- { os: ubuntu-latest, configs: openssl-noec }
60-
- { os: ubuntu-latest, configs: openssl-1.0.1 }
61-
- { os: ubuntu-latest, configs: openssl-1.0.1u }
62-
- { os: ubuntu-latest, configs: openssl-1.0.2u }
63-
- { os: ubuntu-latest, configs: openssl-1.1.0h }
64-
- { os: ubuntu-latest, configs: openssl-1.1.1 }
65-
- { os: ubuntu-latest, configs: openssl-1.1.1k }
66-
- { os: ubuntu-latest, configs: openssl-1.1.1n }
67-
- { os: ubuntu-latest, configs: openssl-1.1.1p }
68-
- { os: ubuntu-latest, configs: openssl-3.0.0 }
69-
- { os: ubuntu-latest, configs: openssl-3.0.5 }
70-
- { os: ubuntu-latest, configs: openssl-1.1.1_stable } # stable branch
71-
- { os: ubuntu-latest, configs: openssl-3.0 } # stable branch
72-
- { os: ubuntu-22.04, configs: pam }
73-
- { os: ubuntu-22.04, configs: krb5 }
74-
- { os: ubuntu-22.04, configs: heimdal }
75-
- { os: ubuntu-22.04, configs: libedit }
76-
- { os: ubuntu-22.04, configs: sk }
77-
- { os: ubuntu-22.04, configs: selinux }
78-
- { os: ubuntu-22.04, configs: kitchensink }
79-
- { os: ubuntu-22.04, configs: without-openssl }
80-
- { os: macos-11, configs: pam }
81-
- { os: macos-12, configs: pam }
82-
runs-on: ${{ matrix.os }}
21+
- { target: windows-2019, config: cygwin-release }
22+
- { target: windows-2022, config: cygwin-release }
23+
- { target: ubuntu-20.04, config: valgrind-1 }
24+
- { target: ubuntu-20.04, config: valgrind-2 }
25+
- { target: ubuntu-20.04, config: valgrind-3 }
26+
- { target: ubuntu-20.04, config: valgrind-4 }
27+
- { target: ubuntu-20.04, config: valgrind-5 }
28+
- { target: ubuntu-20.04, config: valgrind-unit }
29+
- { target: ubuntu-20.04, config: c89 }
30+
- { target: ubuntu-20.04, config: clang-6.0 }
31+
- { target: ubuntu-20.04, config: clang-8 }
32+
- { target: ubuntu-20.04, config: clang-9 }
33+
- { target: ubuntu-20.04, config: clang-10 }
34+
- { target: ubuntu-20.04, config: clang-11 }
35+
- { target: ubuntu-20.04, config: clang-12-Werror }
36+
- { target: ubuntu-20.04, config: clang-sanitize-address }
37+
- { target: ubuntu-20.04, config: clang-sanitize-undefined }
38+
- { target: ubuntu-20.04, config: gcc-sanitize-address }
39+
- { target: ubuntu-20.04, config: gcc-sanitize-undefined }
40+
- { target: ubuntu-20.04, config: gcc-7 }
41+
- { target: ubuntu-20.04, config: gcc-8 }
42+
- { target: ubuntu-20.04, config: gcc-10 }
43+
- { target: ubuntu-20.04, config: gcc-11-Werror }
44+
- { target: ubuntu-20.04, config: pam }
45+
- { target: ubuntu-20.04, config: kitchensink }
46+
- { target: ubuntu-20.04, config: hardenedmalloc }
47+
- { target: ubuntu-20.04, config: tcmalloc }
48+
- { target: ubuntu-20.04, config: musl }
49+
- { target: ubuntu-latest, config: libressl-master }
50+
- { target: ubuntu-latest, config: libressl-2.2.9 }
51+
- { target: ubuntu-latest, config: libressl-2.8.3 }
52+
- { target: ubuntu-latest, config: libressl-3.0.2 }
53+
- { target: ubuntu-latest, config: libressl-3.2.6 }
54+
- { target: ubuntu-latest, config: libressl-3.3.6 }
55+
- { target: ubuntu-latest, config: libressl-3.4.3 }
56+
- { target: ubuntu-latest, config: libressl-3.5.3 }
57+
- { target: ubuntu-latest, config: libressl-3.6.1 }
58+
- { target: ubuntu-latest, config: libressl-3.7.0 }
59+
- { target: ubuntu-latest, config: openssl-master }
60+
- { target: ubuntu-latest, config: openssl-noec }
61+
- { target: ubuntu-latest, config: openssl-1.0.1 }
62+
- { target: ubuntu-latest, config: openssl-1.0.1u }
63+
- { target: ubuntu-latest, config: openssl-1.0.2u }
64+
- { target: ubuntu-latest, config: openssl-1.1.0h }
65+
- { target: ubuntu-latest, config: openssl-1.1.1 }
66+
- { target: ubuntu-latest, config: openssl-1.1.1k }
67+
- { target: ubuntu-latest, config: openssl-1.1.1n }
68+
- { target: ubuntu-latest, config: openssl-1.1.1q }
69+
- { target: ubuntu-latest, config: openssl-1.1.1s }
70+
- { target: ubuntu-latest, config: openssl-3.0.0 }
71+
- { target: ubuntu-latest, config: openssl-3.0.5 }
72+
- { target: ubuntu-latest, config: openssl-3.0.7 }
73+
- { target: ubuntu-latest, config: openssl-1.1.1_stable }
74+
- { target: ubuntu-latest, config: openssl-3.0 } # stable branch
75+
- { target: ubuntu-22.04, config: pam }
76+
- { target: ubuntu-22.04, config: krb5 }
77+
- { target: ubuntu-22.04, config: heimdal }
78+
- { target: ubuntu-22.04, config: libedit }
79+
- { target: ubuntu-22.04, config: sk }
80+
- { target: ubuntu-22.04, config: selinux }
81+
- { target: ubuntu-22.04, config: kitchensink }
82+
- { target: ubuntu-22.04, config: without-openssl }
83+
- { target: macos-11, config: pam }
84+
- { target: macos-12, config: pam }
85+
runs-on: ${{ matrix.target }}
8386
steps:
8487
- name: set cygwin git params
85-
if: ${{ startsWith(matrix.os, 'windows') }}
88+
if: ${{ startsWith(matrix.target, 'windows') }}
8689
run: git config --global core.autocrlf input
8790
- name: install cygwin
88-
if: ${{ startsWith(matrix.os, 'windows') }}
91+
if: ${{ startsWith(matrix.target, 'windows') }}
8992
uses: cygwin/cygwin-install-action@master
90-
- uses: actions/checkout@v2
93+
- uses: actions/checkout@main
9194
- name: setup CI system
92-
run: sh ./.github/setup_ci.sh ${{ matrix.configs }}
95+
run: sh ./.github/setup_ci.sh ${{ matrix.config }}
9396
- name: autoreconf
9497
run: sh -c autoreconf
9598
- name: configure
96-
run: sh ./.github/configure.sh ${{ matrix.configs }}
99+
run: sh ./.github/configure.sh ${{ matrix.config }}
97100
- name: save config
98-
uses: actions/upload-artifact@v2
101+
uses: actions/upload-artifact@main
99102
with:
100-
name: ${{ matrix.os }}-${{ matrix.configs }}-config
103+
name: ${{ matrix.target }}-${{ matrix.config }}-config
101104
path: config.h
102105
- name: make clean
103106
run: make clean
104107
- name: make
105108
run: make -j2
106109
- name: make tests
107-
run: sh ./.github/run_test.sh ${{ matrix.configs }}
110+
run: sh ./.github/run_test.sh ${{ matrix.config }}
108111
env:
109112
TEST_SSH_UNSAFE_PERMISSIONS: 1
110113
TEST_SSH_HOSTBASED_AUTH: yes
111114
- name: save logs
112115
if: failure()
113-
uses: actions/upload-artifact@v2
116+
uses: actions/upload-artifact@main
114117
with:
115-
name: ${{ matrix.os }}-${{ matrix.configs }}-logs
118+
name: ${{ matrix.target }}-${{ matrix.config }}-logs
116119
path: |
117120
config.h
118121
config.log

.github/workflows/cifuzz.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CIFuzz
2+
on:
3+
push:
4+
paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ]
5+
pull_request:
6+
paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ]
7+
8+
jobs:
9+
Fuzzing:
10+
if: github.repository != 'openssh/openssh-portable-selfhosted'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Build Fuzzers
14+
id: build
15+
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
16+
with:
17+
oss-fuzz-project-name: 'openssh'
18+
dry-run: false
19+
language: c++
20+
- name: Run Fuzzers
21+
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
22+
with:
23+
oss-fuzz-project-name: 'openssh'
24+
fuzz-seconds: 600
25+
dry-run: false
26+
language: c++
27+
- name: Upload Crash
28+
uses: actions/upload-artifact@main
29+
if: failure() && steps.build.outcome == 'success'
30+
with:
31+
name: artifacts
32+
path: ./out/artifacts

0 commit comments

Comments
 (0)