Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 7a8db1a

Browse files
committed
Merge commit '479eca13aaaa46b43e68c52186e3783f06ae6f34'
2 parents 84434d2 + 479eca1 commit 7a8db1a

153 files changed

Lines changed: 3328 additions & 1298 deletions

File tree

Some content is hidden

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

.gitlab-ci.yml

Lines changed: 70 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
variables:
33
BUILD_IMAGES_PROJECT: libssh/build-images
44
CENTOS7_BUILD: buildenv-centos7
5+
CENTOS8_BUILD: buildenv-c8s
56
CENTOS9_BUILD: buildenv-c9s
6-
COVERITY_BUILD: buildenv-coverity
77
FEDORA_BUILD: buildenv-fedora
88
MINGW_BUILD: buildenv-mingw
99
TUMBLEWEED_BUILD: buildenv-tumbleweed
1010
UBUNTU_BUILD: buildenv-ubuntu
1111
ALPINE_BUILD: buildenv-alpine
1212

1313
stages:
14+
- review
1415
- build
1516
- test
1617
- analysis
@@ -66,6 +67,23 @@ stages:
6667
extends: .tests
6768
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD
6869

70+
.fips:
71+
extends: .tests
72+
variables:
73+
# DSA is turned off in fips mode
74+
CMAKE_ADDITIONAL_OPTIONS: -DWITH_PKCS11_URI=ON -DWITH_DSA=OFF
75+
before_script:
76+
- *build
77+
- echo "# userspace fips" > /etc/system-fips
78+
# We do not need the kernel part, but in case we ever do:
79+
# mkdir -p /var/tmp/userspace-fips
80+
# echo 1 > /var/tmp/userspace-fips/fips_enabled
81+
# mount --bind /var/tmp/userspace-fips/fips_enabled \
82+
# /proc/sys/crypto/fips_enabled
83+
- update-crypto-policies --show
84+
- update-crypto-policies --set FIPS
85+
- update-crypto-policies --show
86+
6987

7088
###############################################################################
7189
# CentOS builds #
@@ -82,12 +100,40 @@ centos7/openssl_1.0.x/x86_64:
82100
centos9s/openssl_3.0.x/x86_64:
83101
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS9_BUILD
84102
extends: .tests
103+
variables:
104+
CMAKE_ADDITIONAL_OPTIONS: -DWITH_PKCS11_URI=ON
85105
script:
86106
- export OPENSSL_ENABLE_SHA1_SIGNATURES=1
87-
- cmake3 $CMAKE_OPTIONS .. &&
107+
- cmake $CMAKE_OPTIONS $CMAKE_ADDITIONAL_OPTIONS .. &&
88108
make -j$(nproc) &&
89109
ctest --output-on-failure
90110

111+
centos9s/openssl_3.0.x/x86_64/fips:
112+
extends: .fips
113+
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS9_BUILD
114+
script:
115+
- export OPENSSL_ENABLE_SHA1_SIGNATURES=1
116+
- cmake $CMAKE_OPTIONS $CMAKE_ADDITIONAL_OPTIONS .. &&
117+
make -j$(nproc) &&
118+
OPENSSL_FORCE_FIPS_MODE=1 ctest --output-on-failure
119+
120+
centos8s/openssl_1.1.1/x86_64:
121+
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS8_BUILD
122+
extends: .tests
123+
variables:
124+
CMAKE_ADDITIONAL_OPTIONS: -DWITH_PKCS11_URI=ON
125+
script:
126+
- cmake $CMAKE_OPTIONS $CMAKE_ADDITIONAL_OPTIONS .. &&
127+
make -j$(nproc) &&
128+
ctest --output-on-failure
129+
130+
centos8s/openssl_1.1.1/x86_64/fips:
131+
extends: .fips
132+
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS8_BUILD
133+
script:
134+
- cmake $CMAKE_OPTIONS $CMAKE_ADDITIONAL_OPTIONS .. &&
135+
make -j$(nproc) &&
136+
OPENSSL_FORCE_FIPS_MODE=1 ctest --output-on-failure
91137

92138
###############################################################################
93139
# Fedora builds #
@@ -111,31 +157,6 @@ fedora/ninja:
111157
fedora/openssl_3.0.x/x86_64:
112158
extends: .fedora
113159

114-
fedora/openssl_3.0.x/x86_64/fips:
115-
extends: .fedora
116-
before_script:
117-
- echo "# userspace fips" > /etc/system-fips
118-
# We do not need the kernel part, but in case we ever do:
119-
# mkdir -p /var/tmp/userspace-fips
120-
# echo 1 > /var/tmp/userspace-fips/fips_enabled
121-
# mount --bind /var/tmp/userspace-fips/fips_enabled \
122-
# /proc/sys/crypto/fips_enabled
123-
- update-crypto-policies --show
124-
- update-crypto-policies --set FIPS
125-
- update-crypto-policies --show
126-
- mkdir -p obj && cd obj && cmake
127-
-DCMAKE_BUILD_TYPE=RelWithDebInfo
128-
-DPICKY_DEVELOPER=ON
129-
-DWITH_BLOWFISH_CIPHER=ON
130-
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON -DWITH_PCAP=ON
131-
-DWITH_DEBUG_CRYPTO=ON -DWITH_DEBUG_PACKET=ON -DWITH_DEBUG_CALLTRACE=ON
132-
-DWITH_DSA=ON
133-
-DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON ..
134-
script:
135-
- cmake $CMAKE_OPTIONS .. &&
136-
make -j$(nproc) &&
137-
OPENSSL_FORCE_FIPS_MODE=1 ctest --output-on-failure
138-
139160
fedora/openssl_3.0.x/x86_64/minimal:
140161
extends: .fedora
141162
variables:
@@ -309,15 +330,15 @@ fedora/csbuild/mbedtls:
309330
###############################################################################
310331
# Ubuntu builds #
311332
###############################################################################
312-
ubuntu/openssl_1.1.x/x86_64:
333+
ubuntu/openssl_3.0.x/x86_64:
313334
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$UBUNTU_BUILD
314335
extends: .tests
315336

316337

317338
###############################################################################
318339
# Alpine builds #
319340
###############################################################################
320-
alpine/musl:
341+
alpine/openssl_3.0.x/musl:
321342
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$ALPINE_BUILD
322343
extends: .tests
323344
script:
@@ -334,12 +355,12 @@ alpine/musl:
334355
###############################################################################
335356
# Tumbleweed builds #
336357
###############################################################################
337-
tumbleweed/openssl_1.1.x/x86_64/gcc:
358+
tumbleweed/openssl_3.0.x/x86_64/gcc:
338359
extends: .tumbleweed
339360
variables:
340361
CMAKE_ADDITIONAL_OPTIONS: "-DKRB5_CONFIG=/usr/lib/mit/bin/krb5-config"
341362

342-
tumbleweed/openssl_1.1.x/x86/gcc:
363+
tumbleweed/openssl_3.0.x/x86/gcc:
343364
extends: .tumbleweed
344365
script:
345366
- cmake
@@ -350,14 +371,15 @@ tumbleweed/openssl_1.1.x/x86/gcc:
350371
-DWITH_ZLIB=ON
351372
-DWITH_PCAP=ON
352373
-DWITH_DSA=ON
353-
-DUNIT_TESTING=ON ..
374+
-DUNIT_TESTING=ON .. &&
375+
make -j$(nproc)
354376

355-
tumbleweed/openssl_1.1.x/x86_64/gcc7:
377+
tumbleweed/openssl_3.0.x/x86_64/gcc7:
356378
extends: .tumbleweed
357379
variables:
358380
CMAKE_ADDITIONAL_OPTIONS: "-DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7 -DKRB5_CONFIG=/usr/lib/mit/bin/krb5-config"
359381

360-
tumbleweed/openssl_1.1.x/x86/gcc7:
382+
tumbleweed/openssl_3.0.x/x86/gcc7:
361383
extends: .tumbleweed
362384
script:
363385
- cmake
@@ -370,7 +392,7 @@ tumbleweed/openssl_1.1.x/x86/gcc7:
370392
make -j$(nproc) &&
371393
ctest --output-on-failure
372394

373-
tumbleweed/openssl_1.1.x/x86_64/clang:
395+
tumbleweed/openssl_3.0.x/x86_64/clang:
374396
extends: .tumbleweed
375397
variables:
376398
CMAKE_ADDITIONAL_OPTIONS: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DKRB5_CONFIG=/usr/lib/mit/bin/krb5-config"
@@ -402,7 +424,7 @@ tumbleweed/static-analysis:
402424
###############################################################################
403425
# That is a specific runner that we cannot enable universally.
404426
# We restrict it to builds under the $BUILD_IMAGES_PROJECT project.
405-
freebsd/x86_64:
427+
freebsd/openssl_1.1.1/x86_64:
406428
image:
407429
extends: .tests
408430
before_script:
@@ -455,8 +477,6 @@ freebsd/x86_64:
455477
paths:
456478
- obj/
457479
before_script:
458-
- choco install --no-progress -y cmake
459-
- $env:Path += ';C:\Program Files\CMake\bin'
460480
- If (!(test-path .vcpkg\archives)) { mkdir -p .vcpkg\archives }
461481
- $env:VCPKG_DEFAULT_BINARY_CACHE="$PWD\.vcpkg\archives"
462482
- echo $env:VCPKG_DEFAULT_BINARY_CACHE
@@ -496,7 +516,7 @@ visualstudio/x86:
496516

497517
coverity:
498518
stage: analysis
499-
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$COVERITY_BUILD
519+
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS9_BUILD
500520
script:
501521
- mkdir obj && cd obj
502522
- wget https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=$COVERITY_SCAN_PROJECT_NAME" -O /tmp/coverity_tool.tgz
@@ -526,3 +546,14 @@ coverity:
526546
when: on_failure
527547
paths:
528548
- obj/cov-int/*.txt
549+
550+
###############################################################################
551+
# Codespell #
552+
###############################################################################
553+
codespell:
554+
stage: review
555+
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
556+
script:
557+
- codespell --ignore-words-list=keypair,sorce,ned,nd,ue
558+
tags:
559+
- shared

CHANGELOG

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,34 @@
11
CHANGELOG
22
=========
33

4+
version 0.10.5 (released 2023-05-04)
5+
* Fix CVE-2023-1667: a NULL dereference during rekeying with algorithm guessing
6+
* Fix CVE-2023-2283: a possible authorization bypass in
7+
pki_verify_data_signature under low-memory conditions.
8+
* Fix several memory leaks in GSSAPI handling code
9+
* Escape braces in ProxyCommand created from ProxyJump options for zsh
10+
compatibility.
11+
* Fix pkg-config path relocation for MinGW
12+
* Improve doxygen documentation
13+
* Fix build with cygwin due to the glob support
14+
* Do not enqueue outgoing packets after sending SSH2_MSG_NEWKEYS
15+
* Add support for SSH_SUPPRESS_DEPRECATED
16+
* Avoid functions declarations without prototype to build with clang 15
17+
* Fix spelling issues
18+
* Avoid expanding KnownHosts, ProxyCommands and IdentityFiles repetitively
19+
* Add support sk-* keys through configuration
20+
* Improve checking for Argp library
21+
* Log information about received extensions
22+
* Correctly handle rekey with delayed compression
23+
* Move the EC keys handling to OpenSSL 3.0 API
24+
* Record peer disconnect message
25+
* Avoid deadlock when write buffering occurs and we call poll recursively to
26+
flush the output buffer
27+
* Disable preauthentication compression by default
28+
* Add CentOS 8 Stream / OpenSSL 1.1.1 to CI
29+
* Add accidentally removed default compile flags
30+
* Solve incorrect parsing of ProxyCommand option
31+
432
version 0.10.4 (released 2022-09-07)
533
* Fixed issues with KDF on big endian
634

@@ -75,7 +103,7 @@ version 0.9.4 (released 2020-04-09)
75103
* Fixed CVE-2020-1730 - Possible DoS in client and server when handling
76104
AES-CTR keys with OpenSSL
77105
* Added diffie-hellman-group14-sha256
78-
* Fixed serveral possible memory leaks
106+
* Fixed several possible memory leaks
79107

80108
version 0.9.3 (released 2019-12-10)
81109
* Fixed CVE-2019-14889 - SCP: Unsanitized location leads to command execution
@@ -226,7 +254,7 @@ version 0.6.1 (released 2014-02-08)
226254
* Fixed DSA signature extraction.
227255
* Fixed some memory leaks.
228256
* Fixed read of non-connected socket.
229-
* Fixed thread dectection.
257+
* Fixed thread detection.
230258

231259
version 0.6.0 (released 2014-01-08)
232260
* Added new publicy key API.
@@ -251,7 +279,7 @@ version 0.6.0 (released 2014-01-08)
251279
version 0.5.5 (released 2013-07-26)
252280
* BUG 103: Fix ProxyCommand parsing.
253281
* Fix setting -D_FORTIFY_SOURCE=2.
254-
* Fix pollset error return if emtpy.
282+
* Fix pollset error return if empty.
255283
* Fix NULL pointer checks in channel functions.
256284
* Several bugfixes.
257285

@@ -267,7 +295,7 @@ version 0.5.3 (released 2012-11-20)
267295
* BUG #84 - Fix bug in sftp_mkdir not returning on error.
268296
* BUG #85 - Fixed a possible channel infinite loop if the connection dropped.
269297
* BUG #88 - Added missing channel request_state and set it to accepted.
270-
* BUG #89 - Reset error state to no error on successful SSHv1 authentiction.
298+
* BUG #89 - Reset error state to no error on successful SSHv1 authentication.
271299
* Fixed a possible use after free in ssh_free().
272300
* Fixed multiple possible NULL pointer dereferences.
273301
* Fixed multiple memory leaks in error paths.
@@ -328,7 +356,7 @@ version 0.4.7 (released 2010-12-28)
328356
* Fixed a possible memory leak in ssh_get_user_home().
329357
* Fixed a memory leak in sftp_xstat.
330358
* Fixed uninitialized fd->revents member.
331-
* Fixed timout value in ssh_channel_accept().
359+
* Fixed timeout value in ssh_channel_accept().
332360
* Fixed length checks in ssh_analyze_banner().
333361
* Fixed a possible data overread and crash bug.
334362
* Fixed setting max_fd which breaks ssh_select().
@@ -351,7 +379,7 @@ version 0.4.5 (released 2010-07-13)
351379
* Added option to bind a client to an ip address.
352380
* Fixed the ssh socket polling function.
353381
* Fixed Windows related bugs in bsd_poll().
354-
* Fixed serveral build warnings.
382+
* Fixed several build warnings.
355383

356384
version 0.4.4 (released 2010-06-01)
357385
* Fixed a bug in the expand function for escape sequences.
@@ -370,17 +398,17 @@ version 0.4.3 (released 2010-05-18)
370398
* Fixed sftp_chown.
371399
* Fixed sftp_rename on protocol version 3.
372400
* Fixed a blocking bug in channel_poll.
373-
* Fixed config parsing wich has overwritten user specified values.
401+
* Fixed config parsing which has overwritten user specified values.
374402
* Fixed hashed [host]:port format in knownhosts
375403
* Fixed Windows build.
376-
* Fixed doublefree happening after a negociation error.
404+
* Fixed doublefree happening after a negotiation error.
377405
* Fixed aes*-ctr with <= OpenSSL 0.9.7b.
378406
* Fixed some documentation.
379407
* Fixed exec example which has broken read usage.
380408
* Fixed broken algorithm choice for server.
381409
* Fixed a typo that we don't export all symbols.
382410
* Removed the unneeded dependency to doxygen.
383-
* Build examples only on the Linux plattform.
411+
* Build examples only on the Linux platform.
384412

385413
version 0.4.2 (released 2010-03-15)
386414
* Added owner and group information in sftp attributes.
@@ -402,7 +430,7 @@ version 0.4.1 (released 2010-02-13)
402430
* Added an example for exec.
403431
* Added private key type detection feature in privatekey_from_file().
404432
* Fixed zlib compression fallback.
405-
* Fixed kex bug that client preference should be prioritary
433+
* Fixed kex bug that client preference should be priority
406434
* Fixed known_hosts file set by the user.
407435
* Fixed a memleak in channel_accept().
408436
* Fixed underflow when leave_function() are unbalanced
@@ -540,7 +568,7 @@ version 0.11-dev
540568
* Keyboard-interactive authentication working.
541569

542570
version 0.1 (released 2004-03-05)
543-
* Begining of sftp subsystem implementation.
571+
* Beginning of sftp subsystem implementation.
544572
* Some cleanup into channels implementation
545573
* Now every channel functions is called by its CHANNEL handler.
546574
* Added channel_poll() and channel_read().
@@ -561,7 +589,7 @@ version 0.0.4 (released 2003-10-10)
561589
* Added a wrapper.c file. The goal is to provide a similar API to every
562590
cryptographic functions. bignums and sha/md5 are wrapped now.
563591
* More work than it first looks.
564-
* Support for other crypto libs planed (lighter libs)
592+
* Support for other crypto libs planned (lighter libs)
565593
* Fixed stupid select() bug.
566594
* Libssh now compiles and links with openssl 0.9.6
567595
* RSA pubkey authentication code now works !

CMakeLists.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
1010
include(DefineCMakeDefaults)
1111
include(DefineCompilerFlags)
1212

13-
project(libssh VERSION 0.10.4 LANGUAGES C)
13+
project(libssh VERSION 0.10.5 LANGUAGES C)
1414

1515
# global needed variable
1616
set(APPLICATION_NAME ${PROJECT_NAME})
@@ -22,7 +22,7 @@ set(APPLICATION_NAME ${PROJECT_NAME})
2222
# Increment AGE. Set REVISION to 0
2323
# If the source code was changed, but there were no interface changes:
2424
# Increment REVISION.
25-
set(LIBRARY_VERSION "4.9.4")
25+
set(LIBRARY_VERSION "4.9.5")
2626
set(LIBRARY_SOVERSION "4")
2727

2828
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
@@ -103,9 +103,7 @@ if (WITH_NACL)
103103
endif (NOT NACL_FOUND)
104104
endif (WITH_NACL)
105105

106-
if (BSD OR SOLARIS OR OSX OR CYGWIN)
107-
find_package(Argp)
108-
endif (BSD OR SOLARIS OR OSX OR CYGWIN)
106+
find_package(Argp)
109107

110108
# Disable symbol versioning in non UNIX platforms
111109
if (UNIX)
@@ -125,7 +123,7 @@ add_subdirectory(src)
125123

126124
# pkg-config file
127125
if (UNIX OR MINGW)
128-
configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc)
126+
configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc @ONLY)
129127
install(
130128
FILES
131129
${CMAKE_CURRENT_BINARY_DIR}/libssh.pc

0 commit comments

Comments
 (0)