Skip to content

Commit

Permalink
Merge pull request #672 from ejohnstown/release-v1.4.17
Browse files Browse the repository at this point in the history
Prepare Release v1.4.17
  • Loading branch information
douzzer committed Mar 25, 2024
2 parents 295e5ab + a91a1fd commit 9204ae7
Show file tree
Hide file tree
Showing 95 changed files with 258 additions and 217 deletions.
52 changes: 52 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
# wolfSSH v1.4.17 (March 25, 2024)

## Vulnerabilities

* Fixes a vulnerability where a properly crafted SSH client can bypass user
authentication in the wolfSSH server code. The added fix filters the
messages that are allowed during different operational states.

## Notes

* When building wolfSSL/wolfCrypt versions before v5.6.6 with CMake,
wolfSSH may have a problem with RSA keys. This is due to wolfSSH not
checking on the size of `___uint128_t`. wolfSSH sees the RSA structure
as the wrong size. You will have to define `HAVE___UINT128_T` if you
know you have it and are using it in wolfSSL. wolfSSL v5.6.6 exports that
define in options.h when using CMake.
* The example server in directory examples/server/server.c has been removed.
It was never kept up to date, the echoserver did its job as an example and
test server.

## New Features

* Added functions to set algorithms lists for KEX at run-time, and some
functions to inspect which algorithms are set or are available to use.
* In v1.4.15, we had disabled SHA-1 in the build by default. SHA-1 has been
re-enabled in the build and is now "soft" disabled, where algorithms using
it can be configured for KEX.
* Add Curve25519 KEX support for server/client key agreement.

## Improvements

* Clean up some issues when building for Nucleus.
* Clean up some issues when building for Windows.
* Clean up some issues when building for QNX.
* Added more wolfSSHd testing.
* Added more appropriate build option guard checking.
* General improvements for the ESP32 builds.
* Better terminal support in Windows.
* Better I/O pipes and return codes when running commands or scripts over an
SSH connection.

## Fixes

* Fix shell terminal window resizing and it sets up the environment better.
* Fix some corner cases with the SFTP testing.
* Fix some corner cases with SFTP in general.
* Fix verifying RSA signatures.
* Add masking of file mode bits for Zephyr.
* Fix leak of terminal modes cache.

---

# wolfSSH v1.4.15 (December 22, 2023)

## Vulnerabilities
Expand Down
5 changes: 3 additions & 2 deletions apps/wolfssh/common.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* common.c
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down Expand Up @@ -451,7 +451,8 @@ int ClientPublicKeyCheck(const byte* pubKey, word32 pubKeySz, void* ctx)
current->ipString);
WLOG(WS_LOG_DEBUG,
"\texpecting host IP : %s", (char*)ctx);
if (XSTRCMP(ctx, current->ipString) == 0) {
if (XSTRCMP((const char*)ctx,
current->ipString) == 0) {
WLOG(WS_LOG_DEBUG, "\tmatched!");
ipMatch = 1;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/wolfssh/common.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* common.h
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
4 changes: 2 additions & 2 deletions apps/wolfssh/wolfssh.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* wolfssh.c
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down Expand Up @@ -794,7 +794,7 @@ static int config_parse_command_line(struct config* config,
free(config->user);
}
sz = WSTRLEN(cursor);
config->user = WMALLOC(sz + 1, NULL, 0);
config->user = (char*)WMALLOC(sz + 1, NULL, 0);
strcpy(config->user, cursor);
cursor = found + 1;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/wolfsshd/auth.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* auth.c
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
2 changes: 1 addition & 1 deletion apps/wolfsshd/auth.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* auth.h
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
2 changes: 1 addition & 1 deletion apps/wolfsshd/configuration.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* configuration.c
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
2 changes: 1 addition & 1 deletion apps/wolfsshd/configuration.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* configuration.h
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
5 changes: 3 additions & 2 deletions apps/wolfsshd/wolfsshd.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* wolfsshd.c
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down Expand Up @@ -1391,8 +1391,9 @@ static int SHELL_Subsystem(WOLFSSHD_CONNECTION* conn, WOLFSSH* ssh,
#if defined(HAVE_SYS_IOCTL_H)
wolfSSH_DoModes(ssh->modes, ssh->modesSz, childFd);
{
struct winsize s = {0};
struct winsize s;

WMEMSET(&s, 0, sizeof(s));
s.ws_col = ssh->widthChar;
s.ws_row = ssh->heightRows;
s.ws_xpixel = ssh->widthPixels;
Expand Down
29 changes: 15 additions & 14 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# wolfssh
# Copyright (C) 2014-2023 wolfSSL Inc.
# Copyright (C) 2014-2024 wolfSSL Inc.
# All right reserved.

AC_COPYRIGHT([Copyright (C) 2014-2023 wolfSSL Inc.])
AC_INIT([wolfssh],[1.4.16],[support@wolfssl.com],[wolfssh],[https://www.wolfssl.com])
AC_COPYRIGHT([Copyright (C) 2014-2024 wolfSSL Inc.])
AC_INIT([wolfssh],[1.4.17],[support@wolfssl.com],[wolfssh],[https://www.wolfssl.com])
AC_PREREQ([2.63])
AC_CONFIG_AUX_DIR([build-aux])

Expand All @@ -18,18 +18,19 @@ AC_ARG_PROGRAM
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])

WOLFSSH_LIBRARY_VERSION=15:3:8
# | | |
# +------+ | +---+
# | | |
WOLFSSH_LIBRARY_VERSION=16:0:9
# | | |
# +-----+ | +----+
# | | |
# current:revision:age
# | | |
# | | +- increment if interfaces have been added
# | | set to zero if interfaces have been removed
# | | or changed
# | +- increment if source code has changed
# | set to zero if current is incremented
# +- increment if interfaces have been added, removed or changed
# | | |
# | | +- increment if interfaces have been added
# | | +- set to zero if interfaces have been
# | | removed or changed
# | +- increment if source code has changed
# | +- set to zero if current is incremented
# +- increment if interfaces have been added, removed
# or changed
AC_SUBST([WOLFSSH_LIBRARY_VERSION])

LT_PREREQ([2.2])
Expand Down
2 changes: 1 addition & 1 deletion examples/client/client.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* client.c
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
2 changes: 1 addition & 1 deletion examples/client/client.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* client.h
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
5 changes: 3 additions & 2 deletions examples/client/common.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* common.c
*
* Copyright (C) 2014-2022 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down Expand Up @@ -403,7 +403,8 @@ int ClientPublicKeyCheck(const byte* pubKey, word32 pubKeySz, void* ctx)
current->ipString);
WLOG(WS_LOG_DEBUG,
"\texpecting host IP : %s", (char*)ctx);
if (XSTRCMP(ctx, current->ipString) == 0) {
if (XSTRCMP((const char*)ctx,
current->ipString) == 0) {
WLOG(WS_LOG_DEBUG, "\tmatched!");
ipMatch = 1;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/client/common.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* common.h
*
* Copyright (C) 2014-2022 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
2 changes: 1 addition & 1 deletion examples/echoserver/echoserver.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* echoserver.c
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
2 changes: 1 addition & 1 deletion examples/echoserver/echoserver.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* echoserver.h
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
2 changes: 1 addition & 1 deletion examples/portfwd/portfwd.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* portfwd.c
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
2 changes: 1 addition & 1 deletion examples/portfwd/wolfssh_portfwd.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* wolfssh_portfwd.h
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
2 changes: 1 addition & 1 deletion examples/scpclient/scpclient.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* scpclient.c
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
2 changes: 1 addition & 1 deletion examples/scpclient/scpclient.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* scpclient.h
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
2 changes: 1 addition & 1 deletion examples/sftpclient/sftpclient.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* sftpclient.c
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
2 changes: 1 addition & 1 deletion examples/sftpclient/sftpclient.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* sftpclient.h
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
2 changes: 1 addition & 1 deletion ide/Espressif/ESP-IDF/default_espressif_options.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* wolfssl options.h
* generated from configure options
*
* Copyright (C) 2014-2023 wolfSSL Inc.
* Copyright (C) 2014-2024 wolfSSL Inc.
*
* This file is part of wolfSSH.
*
Expand Down
13 changes: 6 additions & 7 deletions ide/Espressif/ESP-IDF/examples/wolfssh_echoserver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# [wolfSSL Project]/CMakeLists.txt
#
# Copyright (C) 2006-2023 WOLFSSL Inc.
# Copyright (C) 2014-2024 wolfSSL Inc.
#
# This file is part of WOLFSSH.
# This file is part of wolfSSH.
#
# WOLFSSH is free software; you can redistribute it and/or modify
# wolfSSH is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# WOLFSSH is distributed in the hope that it will be useful,
# wolfSSH is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
# along with wolfSSH. If not, see <http://www.gnu.org/licenses/>.
#
# cmake for WOLFSSH Espressif projects
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# [wolfSSL Project]/components/wolfssh/CMakeLists.txt
#
# Copyright (C) 2006-2023 WOLFSSL Inc.
# Copyright (C) 2014-2024 wolfSSL Inc.
#
# This file is part of WOLFSSH.
# This file is part of wolfSSH.
#
# WOLFSSH is free software; you can redistribute it and/or modify
# wolfSSH is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# WOLFSSH is distributed in the hope that it will be useful,
# wolfSSH is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
# along with wolfSSH. If not, see <http://www.gnu.org/licenses/>.
#
# cmake for WOLFSSH Espressif projects v5.6.6 r1
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
#
# Copyright (C) 2006-2023 wolfSSL Inc.
# Copyright (C) 2014-2024 wolfSSL Inc.
#
# This file is part of wolfSSL.
# This file is part of wolfSSH.
#
# wolfSSL is free software; you can redistribute it and/or modify
# wolfSSH is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# wolfSSL is distributed in the hope that it will be useful,
# wolfSSH is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
# along with wolfSSH. If not, see <http://www.gnu.org/licenses/>.
#
# cmake for wolfssl Espressif projects
#
Expand Down
Loading

0 comments on commit 9204ae7

Please sign in to comment.