Commit Graph

2504 Commits (bfbf0edbb979603ce165a65a0f7101467647a3f2)

Author SHA1 Message Date
John Safranek 19389809e5 Release v1.4.22
1. Update ChangeLog for last minute PR/Vuln fix.
2025-12-30 15:51:21 -08:00
John Safranek b7c26d273a
Merge pull request #859 from anhu/offby1
Fix an off by one error.
2025-12-30 13:05:25 -07:00
Anthony Hu 65f01e7c7a Fix an off by one error. 2025-12-30 11:03:31 -05:00
JacobBarthelmeh 3e538274df
Merge pull request #858 from ejohnstown/release-1.4.22
Release v1.4.22
2025-12-29 22:02:31 -07:00
John Safranek 8951bd9209 Release v1.4.22
1. Update copyright date to 2026.
2025-12-29 16:53:33 -08:00
John Safranek ef2d4228ba Release v1.4.22
1. Update configure.
2. Update ChangeLog.
3. Let configure link in the keys that are needed for the regression test.
2025-12-29 16:53:19 -08:00
David Garske b5c9751646
Merge pull request #857 from ejohnstown/getstrings
Getting Strings
2025-12-18 13:53:39 -08:00
John Safranek be7784c781 Getting Strings
1. Rewrite GetString() and GetStringAlloc() in terms of GetStringRef().
2. Change GetStringRef() to allow for 0 length strings.
3. Update DoChannelRequest() to use GetStringAlloc() when reading the
   modes from the packet.
2025-12-18 13:27:06 -08:00
John Safranek f1b5b78a98
Merge pull request #847 from miyazakh/sftpclient_RX72N
sftp client example for Renesas RX72N
2025-12-18 09:44:09 -08:00
JacobBarthelmeh 185fe295ed
Merge pull request #856 from LinuxJedi/fix-worker-deadlock
Prevent worker send stall on window backpressure
2025-12-16 16:16:17 -07:00
Andrew Hutchings 05ea1dc3fc Prevent worker send stall on window backpressure
Handle receive-before-send in wolfSSH_worker so window-adjust packets
are processed when the send path is back-pressured, preventing SFTP
stalls with small-window clients.

Add regression that forces WANT_WRITE/WANT_READ paths without relying
on a TTY to guard against deadlock.

Fixed ZD 20958
2025-12-16 17:41:08 +00:00
Eric Blankenhorn 4c7ca0e9eb
Merge pull request #851 from lealem47/vs_fips
Add FIPS configurations to Visual Studio project
2025-12-15 16:35:53 -06:00
Lealem Amedie 1adcdebc1e Documentation feedback 2025-12-15 14:59:32 -07:00
Daniel Pouzzner 3636446baf
Merge pull request #852 from divinity76/fix-sys-errno
replace sys/errno.h with errno.h
2025-12-15 10:42:26 -06:00
Daniel Pouzzner 8a7189d24b
Merge pull request #848 from divinity76/patch-1
fix error: implicit declaration of function 'wc_SSH_KDF'
2025-12-15 10:41:59 -06:00
Daniel Pouzzner 6e9775204a
Merge pull request #855 from ejohnstown/vvv
Out Of Order Messaging Checking
2025-12-15 10:33:48 -06:00
Lealem Amedie 7ed7cd6a7f Add some documentation for the FIPS configs 2025-12-12 10:25:39 -07:00
John Safranek 2086f34ff3 Out of Order Message Handling
1. Always set the expected message right before sending. If the send
   fails, it is either because the socket is closing, or it is wanting
   to block. If it is wanting to block, we still want to check the next
   message as expected.
2025-12-11 10:43:35 -08:00
Hideki Miyazaki 63ed4eb072 Addressed code review comments
- enable TSIP
 - clean up user_settings.h
2025-12-10 04:51:19 +09:00
Hideki Miyazaki 344bba5e51 Addressed review comments
- renamed wolfstp_util.c to wolfsftp_util.c
 - removed unnecessary if condition
2025-12-10 04:51:19 +09:00
Hideki Miyazaki 23cc902466 update README 2025-12-10 04:51:19 +09:00
Hideki Miyazaki 9c9d1b0ee1 sftp client example for Renesas RX72N 2025-12-10 04:51:19 +09:00
John Safranek 03ca9221a3 Zephyr
1. Exclude the file regress.c from the Zephyr testing sample. The test
   is covered in many other environments already. The test needs some
   retooling to fit in with the Zephyr build, as it is a standalone
   application with a main() function and it depends on a testing build
   of libwolfssh.
2. Whitespace.
2025-12-09 09:36:38 -08:00
John Safranek 2e5484f36f Server Out of Order Message Handling
1. Updated the checking for the server to be more like the client's
   checking.
2025-12-09 09:36:38 -08:00
Andrew Hutchings dee1c59f26 Fix double-free crash and socket-close spin 2025-12-09 09:36:38 -08:00
Andrew Hutchings 5ae5c250e2 Add tests and fix issues 2025-12-09 09:36:38 -08:00
John Safranek a87ab400b3 Guard out IsKeyingAllowed() as it is stepping on the wrong messages. 2025-12-09 09:36:38 -08:00
John Safranek 73b165651c Client Out Of Order Messaging Checking
1. Add macro for logging an expected message.
2. Add an expected message ID to the HandshakeInfo.
3. Add a message ID for "none (0)".
4. Add a check in IsMessageAllowedClient() for the expected message ID.
   Clear it if successful.
5. The KEXDH messages sent to the server have expected responses. Set
   them if sending the message is successful.
6. Add the set of message ID ranges and macros for testing if a message
   ID is in a specific range.
7. Add flags for having sent the kexinit message and received it. Tweak
   the checks for isKeying and these flags.
8. IsMessageAllowedClient() to check for appropriate messages at the
   appropriate time during the connect.
2025-12-09 09:36:35 -08:00
David Garske a473a05e42
Merge pull request #854 from miyazakh/fix_uninitialized_var
fix uninitialized authData
2025-12-08 07:52:13 -08:00
Hideki Miyazaki c1cfad706d fix uninitialized authData 2025-12-06 12:40:27 +09:00
Lealem Amedie dc9321b714 Add FIPS configurations to Visual Studio project 2025-12-05 16:45:11 -07:00
David Garske b2c683dd3c
Merge pull request #839 from JacobBarthelmeh/logging
define WLOG to a no-op when not used with debugging
2025-12-04 18:27:29 -08:00
JacobBarthelmeh 92cb91664d define WLOG to a no-op when not used with debugging 2025-11-25 09:24:51 -07:00
hanshenrik 44dc148dbd replace sys/errno.h with errno.h
Historically, some systems have used <sys/errno.h> in place of <errno.h>, but the C standard,
 all the way back to C89/Ansi C, specifies that the correct name is `errno.h` -
and most modern compilers create a sys/errno.h compatibility shim sys/errno.h -
but musl-gcc does not have this compatibility shim,
 reasoning that sys/errno.h is non-standard, and fails to compile:
```
$ CC=musl-gcc ./configure --enable-static --disable-shared --enable-scp --enable-sftp --enable-shell --with-wolfssl=wolfssl/install-musl
(...)
$ make
make -j17  all-am
make[1]: Entering directory '/home/hans/projects/wolfssh'
  CC       examples/client/common.o
  CC       examples/client/client.o
  CC       src/libwolfssh_la-ssh.lo
  CC       src/libwolfssh_la-internal.lo
  CC       src/libwolfssh_la-log.lo
  CC       src/libwolfssh_la-port.lo
  CC       src/libwolfssh_la-io.lo
  CC       src/libwolfssh_la-wolfscp.lo
  CC       src/libwolfssh_la-wolfsftp.lo
  CC       examples/echoserver/echoserver.o
  CC       src/libwolfssh_la-wolfterm.lo
  CC       examples/sftpclient/sftpclient.o
  CC       examples/scpclient/scpclient.o
In file included from examples/echoserver/echoserver.c:91:
/usr/include/x86_64-linux-musl/sys/errno.h:1:2: error: #warning redirecting incorrect #include <sys/errno.h> to <errno.h> [-Werror=cpp]
    1 | #warning redirecting incorrect #include <sys/errno.h> to <errno.h>
      |  ^~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:1452: examples/echoserver/echoserver.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/hans/projects/wolfssh'
make: *** [Makefile:1020: all] Error 2
```

so, unless we need to support pre-C89 (35+ year old C) compilers,
we can just replace sys/errno.h with errno.h.
2025-11-22 17:40:20 +01:00
divinity76 91d5c0a052
fix error: implicit declaration of function 'wc_SSH_KDF'
hopefully resolves https://github.com/wolfSSL/wolfssh/issues/781
when compiling with
./configure --enable-static --disable-shared --enable-scp --enable-sftp --enable-shell --enable-cryptonly --with-wolfssl=wolfssl/install/

I got:
$ make -j20
make -j17  all-am
make[1]: warning: -j17 forced in submake: resetting jobserver mode.
make[1]: Entering directory '/home/hans/projects/wolfssh'
  CC       src/libwolfssh_la-internal.lo
src/internal.c: In function 'GenerateKey':
src/internal.c:2348:15: error: implicit declaration of function 'wc_SSH_KDF'; did you mean 'wc_HKDF'? [-Werror=implicit-function-declaration]
 2348 |         ret = wc_SSH_KDF(hashId, keyId, key, keySz,
      |               ^~~~~~~~~~
      |               wc_HKDF
src/internal.c:2348:15: error: nested extern declaration of 'wc_SSH_KDF' [-Werror=nested-externs]
cc1: all warnings being treated as errors
make[1]: *** [Makefile:1483: src/libwolfssh_la-internal.lo] Error 1
make[1]: Leaving directory '/home/hans/projects/wolfssh'
make: *** [Makefile:1020: all] Error 2
2025-11-13 10:25:33 +01:00
David Garske 967d6c59ff
Merge pull request #846 from JacobBarthelmeh/sftp
Fix for interop case with SFTP
2025-10-24 09:44:15 -07:00
JacobBarthelmeh 2d2c1f5ac5
Merge pull request #845 from LinuxJedi/zp-fixes
Fix issues found using ZeroPath
2025-10-23 09:56:32 -06:00
JacobBarthelmeh ae17014f6b Fix for interop case with SFTP 2025-10-22 22:10:08 -06:00
Andrew Hutchings 190dda3aa9 Fix agent test setup
Instantiate a wolfSSH_AGENT_CTX before invoking wolfSSH_AGENT_SignRequest so the regression tests exercise the intended paths instead of failing with WS_AGENT_NULL_E.
2025-10-22 15:31:46 +01:00
Andrew Hutchings 662247394f Add agent sign request regression tests
Exercise agent write failures, non-signature responses, oversized signatures, and the happy path to cover the recent wolfSSH_AGENT_SignRequest hardening.
2025-10-22 15:10:58 +01:00
Andrew Hutchings ab17b01712 Validate agent signature responses
Track the last agent message id, reject non-signature replies, reset the failure flag, and ensure the agent write completes before trusting the returned signature.
2025-10-22 15:00:54 +01:00
Andrew Hutchings ec9ca4fe64 Bound agent signature copies
Treat *sigSz as the caller-provided capacity, raise WS_BUFFER_E if the agent response is larger, and clear the size on failure to avoid buffer overruns.
2025-10-22 14:52:13 +01:00
Andrew Hutchings 06fe99bf6b Clean SCP base path before filesystem access
Call wolfSSH_CleanPath on the client-supplied base path before ParseBasePathHelper so directory probing happens on canonicalised paths.
2025-10-22 14:42:12 +01:00
Andrew Hutchings 42f48d35c6 Reject traversal filenames in SCP receive path
Disallow '.' components and path separators in GetScpFileName so malicious SCP clients cannot escape the configured base directory.
2025-10-22 14:23:30 +01:00
David Garske c10896cae9
Merge pull request #844 from JacobBarthelmeh/release
prepare for release 1.4.21
2025-10-20 14:25:08 -07:00
JacobBarthelmeh 3ff50e4325 prepare for release 1.4.21 2025-10-20 15:02:47 -06:00
David Garske 51414d681f
Merge pull request #843 from JacobBarthelmeh/shadow
example max() conflicts with toolchains max() function
2025-10-20 09:16:00 -07:00
JacobBarthelmeh 59a9227913 example max() conflicts with toolchains max() function 2025-10-17 17:00:03 -06:00
David Garske feb207a286
Merge pull request #842 from JacobBarthelmeh/heapHint
adjust heap hint used with keyboard interactive auth
2025-10-16 11:31:31 -07:00
JacobBarthelmeh 2fa166f227 adjust heap hint used with keyboard interactive auth 2025-10-15 16:05:31 -06:00