1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-10-24 03:48:58 +03:00
Commit Graph

4036 Commits

Author SHA1 Message Date
Will Cosgrove
a88162dd51 Fix decompression check to use remote compression
Fix remote compression flag check. Tested all local/remote configurations with zlib, zlib@openssh.com and none ordering.
2026-10-14 13:22:26 -07:00
Viktor Szakats
83284a05a1 GHA: drop Cygwin site: that became the default upstream [ci skip]
Ref: e50bbb7e3e
2026-10-14 12:19:38 +02:00
Viktor Szakats
cdecc43cb8 GHA/curl: drop repeats, allow retries on fail
In an attempt to improve stability / reduce flakiness of these tests.
Especially the ECDSA-enable ones were prone to mass fail.

```
22:49:30.110000 * Failure establishing ssh session: -43, Failed getting banner
```
Ref: https://github.com/libssh2/libssh2/actions/runs/38480041149/job/115580107883#step:11:1034

This is a different failure than the long-chased flaky -8 kex failures,
which was fixed earlier and did not reoccur since then.

Follow-up to 5bfa574460 #2603
Follow-up to f216bbe3aa #2583
Follow-up to bb8e0957b8 #2590

Closes #2666
2026-10-14 01:22:15 +02:00
Viktor Szakats
18aebe0896 GHA: fail early if mport did not complete the install step
MidnightBSD's `mport install` is prone to return a non-zero exit code on
success (hence the need to use `|| true`; also unrelated to the `grep`
filtering, needed to avoid log noise for no built-in option for this).
Work around by verifying success explicitly, so that a truly failed
install command fails in the 'install prereqs' step, instead of raising
a confusing error (e.g. "cmake: not found") in the step after.

Follow-up to b7f4e55c8f #2120
Follow-up to e4f700e934 #1948

Closes #2663
2026-10-07 20:53:34 +02:00
Viktor Szakats
232c9516ff RELEASE-NOTES: sync [ci skip] 2026-10-07 16:12:21 +02:00
Viktor Szakats
2233bf95ed tests: retry '(-43): Failed getting banner' flaky failures
Example:
```
1: libssh2_session_handshake failed (-43): Failed getting banner
1: ---- sshd log ----
1: No matching private key for certificate: /etc/ssh/ssh_host_mldsa44-ed25519_key-cert.pub
1: debug1: Set /proc/self/oom_score_adj from 0 to -1000
1: debug2: fd 6 setting O_NONBLOCK
1: debug1: Bind to port 22 on 0.0.0.0.
1: Server listening on 0.0.0.0 port 22.
1: debug2: fd 7 setting O_NONBLOCK
1: debug1: Bind to port 22 on ::.
1: Server listening on :: port 22.
1: ------------------
1: Command: docker image pull ghcr.io/libssh2/ci_tests_openssh_server:8d1fde1834077fddb9f9
1: Command: docker image tag ghcr.io/libssh2/ci_tests_openssh_server:8d1fde1834077fddb9f9 libssh2/openssh_server
1: Command: docker run --rm -d -p 22 libssh2/openssh_server
1: Command: docker inspect --format "{{ (index (index .NetworkSettings.Ports \"22/tcp\") 0).HostIp }}" a1f1a209001852fa7e3aba87c0f1198661c4fe07c34ddcbf2e76e264ef64b7b8
1: Command: docker inspect --format "{{ (index (index .NetworkSettings.Ports \"22/tcp\") 0).HostPort }}" a1f1a209001852fa7e3aba87c0f1198661c4fe07c34ddcbf2e76e264ef64b7b8
1: Command: docker logs a1f1a209001852fa7e3aba87c0f1198661c4fe07c34ddcbf2e76e264ef64b7b8
1: Command: docker stop a1f1a209001852fa7e3aba87c0f1198661c4fe07c34ddcbf2e76e264ef64b7b8
 1/61 Test  #1: test_aa_warmup .......................................***Failed    6.08 sec
libssh2_session_handshake failed (-43): Failed getting banner
```
Ref: https://github.com/libssh2/libssh2/actions/runs/37613324059/job/112765610280?pr=2659#step:25:133

Ref: 5bfa574460 #2603

Closes #2662
2026-10-07 15:35:05 +02:00
Viktor Szakats
59329f3402 libssh2_userauth_keyboard_interactive_ex.md: fix allocator requirement
Prior to this patch, the documentation stated that the `.text` buffers
filled by the API caller are "free(3)d" by libssh2, referring to the
default system deallocator. In reality however, libssh2 was using
`SSH2_FREE*()` to free these buffers, respecting custom allocators, if
set by the user via `libssh2_session_init_ex()`.

libssh2 behaved this way since the initial implementation committed in
da653774aa 2005-06-11, v0.11

Later, examples were added that use `strdup()` to allocate, which was
(and is) accurate because they do not use a custom allocator:
9a1ce06e31 2007-07-22

Then, when the documentation landed, it incorrectly documented
`free(3)`, perhaps basing it on the examples added earlier:
d4aa801f6f 2008-03-08

I assume that callers overriding the custom allocators are more likely
to have fixed their code to adhere with how libssh2 actually behaved,
rather than believing the documentation and live with an allocator
mismatch for all these years.

Therefore I think this is a documentation error, and this patch
addresses this.

Reported-by: Makise Kurisu
Fixes GHSA-p6p8-66vc-3f24
Reverts ce631aafe1 #2659
Follow-up to d4aa801f6f
Follow-up to da653774aa

Closes #2661
2026-10-07 15:35:05 +02:00
Viktor Szakats
ce631aafe1 libssh2.h: add two FIXMEs for allocator requirements
`LIBSSH2_USERAUTH_KBDINT_PROMPT` and `LIBSSH2_USERAUTH_KBDINT_RESPONSE`
have a `text` pointer which require using the default system allocator
by the API user, as documented in
`docs/libssh2_userauth_keyboard_interactive_ex.md`.

To align with `libssh2_userauth_publickey_sk()` and best-practices, add
FIXMEs to replace this requirement to use `LIBSSH2_ALLOC_FUNC` for the
custom allocator set via `libssh2_session_init_ex()` (or, if not set use
the default system allocator.)

The above fix requires an ABI break, or a replacement parallel API that
fixes this issue.

Reported-by: Makise Kurisu
Ref: GHSA-p6p8-66vc-3f24

Closes #2659
2026-10-07 13:28:55 +02:00
Viktor Szakats
77e54d8320 libssh2_userauth_publickey_sk.md: say LIBSSH2_ALLOC_FUNC (was: SSH2_ALLOC)
`SSH2_ALLOC()` (or formerly `LIBSSH2_ALLOC()`) is an internal macro, not
available for API users. Mention `LIBSSH2_ALLOC_FUNC` instead to refer
to the custom allocator set via `libssh2_session_init_ex()`. If no
custom allocator was set, it means the default system allocator.

Follow-up to ed439a29bb #698

Closes #2660
2026-10-07 13:28:55 +02:00
syed abdul khaliq
ff501d6346 packet: keep new channel across EAGAIN in x11 and tcpip forward opens
When sending the open confirmation in `packet_x11_open()` or
`packet_queue_listener()` returns EAGAIN, the resumed call loses the
channel it just allocated: the x11 path never saves it in
`x11open_state->channel`, so it links a NULL channel and crashes, and
the listener path clears `listen_state->channel` on every pass, so the
server gets a confirmation for a channel that is never queued and leaks.
This keeps the pointer in the state struct the same way
`packet_authagent_open()` already does, which I checked with a send
callback that returns EAGAIN once (ASan SEGV in `ssh2_list_add()`
before, and the channel reaches the x11 callback and the accept queue
after). I also looked at #1427, which touched the same EAGAIN return,
and this is the gap behind the question raised there about the channel
still being usable when the function is re-entered.

Reported-by: Yin Luming
Ref: https://github.com/LuMingYinDetect/libssh_defects/blob/main/libssh_1.png
Fixes #1427

Closes #2656
2026-10-07 12:48:49 +02:00
Viktor Szakats
d4e5780315 comp: mitigate potential side-channel attack by disabling LZ77 in zlib compression
Note, this change lowers the compression level from 6 (default) to 1
(best speed).

Refs:
https://arxiv.org/pdf/2609.07709
https://www.openssh.org/txt/release-10.6
1d5340fce2
OpenBSD-Commit-ID: 839e5e53ad76786d0e90bed530304e4e13acbba0

Discovered-by: Fabian Bäumer
Discovered-by: Marcus Brinkmann
Based-on-patch-by: Job Snijders

Closes #2658
2026-10-07 00:38:16 +02:00
Viktor Szakats
5d27ee28ed pem: cap accepted KDF rounds in pem_parse_data_openssh()
To 1^20, which ensures the function does complete eventually.

The limit mirrors the one introduced in OpenSSH 10.6. (Release Notes
say 1M, the actual patch uses 1^20; we go with the latter.)

Refs:
https://www.openssh.org/txt/release-10.6
f938c78d49
OpenBSD-Commit-ID: 843ff37b066b2879f4579a784e42a3c9d22b2ddc

Reported-by: QcN3ep
Fixes GHSA-vc97-vgww-qggv

Closes #2657
2026-10-07 00:38:16 +02:00
Viktor Szakats
826fdb283d kex: clear buffers holding secrets
- kex: clear `k_value` buffer in `kex_*_state_cleanup()` functions.
  Reported-by: Ravikanth
  Fixes #2653

- kex: clear shared secret buffer after use in
  `kex_mlkem768x25519_sha256()`.
  Reported-by: Ravikanth
  Fixes #2654
  Follow-up to 3ba252e2a6 #1644

- kex: clear shared secret buffer after use in `kex_mlkem_nistp()`.
  Follow-up to 3ba252e2a6 #1644

Closes #2655
2026-10-06 10:30:17 +02:00
Viktor Szakats
8f80526c49 GHA: bump to LibreSSL 4.3.3, OpenSSL 4.0.3 (from 3.6.x)
Closes #2652
2026-10-05 13:40:23 +02:00
syed abdul khaliq
7f28c290d3 wincng: validate Diffie-Hellman public value in ssh2_dh_secret()
ssh2_dh_secret() in the Windows CNG backend uses the server's
Diffie-Hellman public value f without the range check the other four
backends apply through ssh2_dh_validate(), so a malicious server can
send f of 0, 1 or p-1 and push the shared secret into a trivial subgroup
that openssl, libgcrypt, mbedtls and os400qc3 all reject with
LIBSSH2_ERROR_PROTO. This adds a WinCNG ssh2_dh_validate() that enforces
1 < f < p-1 and the same minimum-set-bits check on the big-endian value,
and calls it at the top of ssh2_dh_secret() like the other backends do.
The shared test_ssh2_dh_validate() in tests/test_simple.c was stubbed
out on WinCNG only because the function did not exist, so it now runs
against the real implementation too.

Reported-by: yaotushaozhu on github
Ref: GHSA-m9rg-h9jv-9gvh
Follow-up to fcf830788d #2239

Closes #2645
2026-10-04 21:17:02 +02:00
Viktor Szakats
9c731b2de1 kex: drop ML-KEM debug/trace code
With the issue fixed, the debug/trace code is no longer necessary.

Also:
- GHA: drop tracing targeting FreeBSD, those flaky failures were not
  seen since then.
  Follow-up to 13dcd170be #2227

Ref: https://github.com/libssh2/libssh2/pull/1644#issuecomment-4761871304
Follow-up to 4f2692fd81 #2633
Follow-up to ca0e2dcf0a #2259
Follow-up to 3ba252e2a6 #1644

Closes #2651
2026-10-04 20:33:12 +02:00
Viktor Szakats
4ab391ec9f tests: set PerSourcePenalties for sshd, bump debug level to 2
To silence a warning, in rare failure cases:
```
srclimit_penalise: ipv4: new 172.17.0.1/32 deferred penalty of 1.000
  seconds for penalty: connections without attempting authentication
```
Ref: https://github.com/libssh2/libssh2/actions/runs/37207427612/job/111451438515?pr=2649#step:25:537

Also:
- seize the opportunity and bump sshd debug level to 2.
  Level 1 is too low to see clearly in some cases.
  Ref: https://github.com/libssh2/libssh2/pull/2649
  Follow-up to 45aa5c5fa4 #2621

Refs:
https://man.openbsd.org/sshd_config#PerSourcePenalties
https://www.openssh.org/txt/release-9.8

Closes #2650
2026-10-04 20:07:33 +02:00
Viktor Szakats
10c374cad4 wincng: check bignum length and resize result in wcng_bn_mod_exp()
- check `wcng_bn_resize()` success. The only call where this check was
  missing.

- check if bignum length is non-zero before calling resize.
  To fix this clang-tidy warning after applying pending PR #2645:
  ```
  src/wincng.c:157:14: error: Call to 'realloc' has an allocation size of 0 bytes [clang-analyzer-optin.portability.UnixAPI,-warnings-as-errors]
    157 |     bignum = realloc(bn->bignum, length);
        |              ^
  [...]
  src/wincng.c:255:27: note: Value assigned to 'offset'
    255 |                     ret = BCryptEncrypt(hKey, bignum, length, NULL, NULL, 0,
        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    256 |                                         r->bignum, (ULONG)r->length, &offset,
        |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    257 |                                         BCRYPT_PAD_NONE);
        |                                         ~~~~~~~~~~~~~~~~
  [...]
  src/wincng.c:259:21: note: Taking true branch
    259 |                     if(BCRYPT_SUCCESS(ret))
        |                     ^
  src/wincng.c:260:43: note: Passing value via 2nd parameter 'length'
    260 |                         wcng_bn_resize(r, offset);
        |                                           ^~~~~~
  src/wincng.c:260:25: note: Calling 'wcng_bn_resize'
    260 |                         wcng_bn_resize(r, offset);
        |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
  [...]
  src/wincng.c:157:14: note: Call to 'realloc' has an allocation size of 0 bytes
    157 |     bignum = realloc(bn->bignum, length);
        |              ^                   ~~~~~~
  ```
  Ref: https://github.com/libssh2/libssh2/actions/runs/37005655840/job/110833185040?pr=2645#step:8:62
  Bug: https://github.com/libssh2/libssh2/pull/2645#issuecomment-5954426479

Closes #2649
2026-10-04 20:07:33 +02:00
Viktor Szakats
740c2d33ad GHA: replace diffie-hellman-group-exchange-sha256 with diffie-hellman-group16-sha512
To use a superior fallback KEX.

Refs:
https://datatracker.ietf.org/doc/html/rfc9142
https://github.blog/changelog/2026-09-22-security-improvements-for-ssh/

Follow-up to bb8e0957b8 #2590

Closes #2648
2026-10-03 00:25:20 +02:00
Viktor Szakats
483f2ab286 RELEASE-NOTES: sync [ci skip] 2026-10-02 23:56:07 +02:00
Viktor Szakats
7839760cdc GHA/codeql: switch GHA check to arm64
Identical performance, better efficiency.

Closes #2647
2026-10-02 23:38:33 +02:00
Viktor Szakats
3b3c1cff2e GHA/codeql: switch Linux job to arm64
For slightly shorter runs, better efficiency.

Closes #2646
2026-10-02 22:48:01 +02:00
filtede98
1f977e77f5 agent: add NULL guards to all public libssh2_agent_*() API functions
All public API functions in `src/agent.c` that take a `LIBSSH2_AGENT *`
were missing a NULL-pointer check at entry.

A caller that passes NULL (for example, after `libssh2_agent_init()`
returns NULL due to OOM) immediately dereferences the null pointer and
crashes.  Every other source file in this tree already has the pattern:
`channel.c`, `sftp.c`, `session.c`, `userauth.c`, and `knownhost.c` all
guard their primary handle before touching any field. `agent.c` was the
only outlier.

Add `if(!agent)` guards consistent with the style used in the rest of
the codebase.

Closes #2635
2026-10-02 18:57:37 +02:00
syed abdul khaliq
4f2692fd81 kex: zero-pad x25519 shared secret in mlkem768x25519
In `kex_mlkem768x25519_sha256` the x25519 half of the hybrid shared
secret is written into a fixed 64-byte buffer with `ssh2_bn_to_bin`,
which emits only the significant bytes and drops any leading zeros. When
the x25519 secret has a leading zero byte (about 1 in 256 handshakes,
and it comes from the server's ephemeral key) the write is short, so the
tail of the buffer is hashed while still uninitialized and the value
sits left-shifted instead of filling the fixed 32-byte field. That means
an uninitialized stack read into the exchange hash and a wrong K, which
fails the signature check for mlkem768x25519-sha256, the first KEX we
offer. This zero-fills the 32-byte field and writes the value
right-aligned so it is always the full fixed-width secret. The sibling
`kex_mlkem_nistp` sizes its heap buffer to the bignum length, so it has
no uninitialized read.

Bug possibly related: https://github.com/libssh2/libssh2/pull/1644#issuecomment-4761871304
Follow-up to 3ba252e2a6 #1644

Closes #2633
2026-10-02 18:57:37 +02:00
syed abdul khaliq
01d0c895fa wincng: fix ECC private key blob allocation size
`wcng_privatekey_from_point()` sizes the ECC private-key blob with
`sizeof(BCRYPT_ECCPRIVATE_BLOB)`, but that name is the wide blob-type
string `L"ECCPRIVATEBLOB"`, not a struct, so the `sizeof` measures the
string (30 bytes on Windows) rather than the 8-byte `BCRYPT_ECCKEY_BLOB`
header. The three `memcpy` offsets right below it, and the public-key
sibling `wcng_publickey_from_point()`, already use
`sizeof(BCRYPT_ECCKEY_BLOB)`, so the buffer ends up oversized and its
uninitialized tail is handed to `BCryptImportKeyPair()` with an inflated
`cbInput`. This is on the path that loads an OpenSSH-format ECDSA
private key through
`libssh2_userauth_publickey_frommemory()`/`fromfile()` on the CNG
backend.

Using `sizeof(BCRYPT_ECCKEY_BLOB)` lines the allocation up with the
header the copies actually write from and with the length passed to
`BCryptImportKeyPair()`. Keeping it in step with the public-key path
means the private blob is described to CNG with exactly the bytes it
holds.

Follow-up to 3e72343737 #1315

Closes #2631
2026-10-02 18:57:37 +02:00
Viktor Szakats
a95ed7d84a GHA: move some jobs to ubuntu-slim and arm64
For better efficiency.

Closes #2644
2026-10-02 12:20:45 +02:00
Viktor Szakats
bb63c2f52f GHA: run clang-tidy jobs on arm64 Linux
For 30-100% faster build steps, and more efficiency.

Closes #2643
2026-10-02 12:13:09 +02:00
Viktor Szakats
c7541acd4b tests/cmake: suppress stderr in if expression
Silencing, seen with MSYS2 shell:
```
+ ln -s ../.. libssh2
ln: failed to create symbolic link 'libssh2': Too many levels of symbolic links
+ rm -rf libssh2
```
Ref: https://github.com/libssh2/libssh2/actions/runs/36978012817/job/110745989451#step:15:40

Closes #2642
2026-10-02 11:11:29 +02:00
Viktor Szakats
b0028ca522 GHA: bump dependencies
Closes #2641
2026-10-02 11:11:29 +02:00
Viktor Szakats
b3e141ff4d GHA/distcheck: pass unix-style paths in MSYS2 configurations
Closes #2640
2026-10-02 10:42:04 +02:00
Viktor Szakats
244b422835 GHA: set cache-mode: none where missing
Follow-up to 917f38bfe3 #2601

Closes #2639
2026-10-02 09:11:39 +02:00
Viktor Szakats
5fa500d58e GHA: bump msys2/setup-msys2 to v2.33.0, related improvements
Also:
- enable MSYS2 cache for both curl tests.
- inherit pre-installed MSYS2 in the ARM64 curl job.
- bump integration tests from mingw64 to ucrt64 env.
- switch deprecated mingw64 jobs to ucrt64/clang64.
  (Keep one mingw64 and one mingw32 job.)
- silence mingw64/mingw32 deprecation warning.

Closes #2638
2026-10-02 00:32:05 +02:00
Viktor Szakats
805317f6eb GHA/windows: move Linux cross-builds to arm64 runners
For slightly better performance, and better efficiency.
Saving over 1 minute. The clang-tidy build is 2x fast.

Also:
- GHA/windows: fix `windres` command-line for non-intel machines.

Closes #2637
2026-10-01 23:44:49 +02:00
Viktor Szakats
9bf9048bee GHA: drop actionlint, abandoned upstream
No release in 6 months, no commit in 5 months. Lots of debt and a
matching number of local workarounds.

Ref: https://github.com/rhysd/actionlint
Follow-up to f61703cc98 #1740

Closes #2636
2026-10-01 23:44:49 +02:00
dependabot[bot]
788ee6d83a GHA: bump Actions
- update `docker/build-push-action` from 7.3.0 to 7.4.0
- update `github/codeql-action/analyze` from 4.37.8 to 4.38.2
- update `github/codeql-action/init` from 4.37.8 to 4.38.2

Closes #2634
2026-10-01 23:17:57 +02:00
Viktor Szakats
2e1717456b GHA: omit running tests in clang-tidy Linux jobs
To reduce CI runtimes and total CI turnaround time. clang-tidy jobs were
often the longest running ones before this patch.

Closes #2627
2026-09-14 11:54:32 +02:00
Viktor Szakats
c3de8626c1 CI: use --parallel for ctest
Go with 8-10 paralellism, which seems to be stable. If it introduces
flakiness, it possible to settle on ctest defaults, or low manual value.

It makes the test step take 2x-3x less time. Typically from 1m/1m30s to
~30s.

Also enable in AppVeyor, using the the CMake-default parallel value,
subject for refinement if we ever run tests there again.

Before: https://github.com/libssh2/libssh2/actions/runs/34788327227
After: https://github.com/libssh2/libssh2/actions/runs/34825431130?pr=2625

Closes #2625
2026-09-14 11:22:52 +02:00
Viktor Szakats
d702b04352 GHA: reduce parallelism to -j4 in macOS runners
To make builds finish a little bit faster, and to match the value used
in curl and the cores offered by these machines. (Was: `-j5`)

Closes #2626
2026-09-14 10:15:01 +02:00
Viktor Szakats
2a76dafa9c src: disable more RSA SHA1 code when unused
Also:
- os400qc3: fix an RSA guard.

Closes #2624
2026-09-14 00:58:11 +02:00
Viktor Szakats
738c2ac4d1 mbedtls: fix -Wunused-variable when building with LIBSSH2_NO_RSA
Fixing:
```
src/mbedtls.c:721:24: error: unused variable 'method_buf_len' [-Wunused-variable]
  721 |     size_t keylen = 0, method_buf_len = 0;
      |                        ^~~~~~~~~~~~~~
src/mbedtls.c:717:56: error: unused parameter 'pkey' [-Wunused-parameter]
  717 |                              const mbedtls_pk_context *pkey)
      |                                                        ^
```

Closes #2623
2026-09-14 00:28:54 +02:00
Viktor Szakats
45aa5c5fa4 tests: dump container sshd log for test failures
To help debugging issues.

Also:
- bump sshd LogLevel to DEBUG1, for essential details.
- bump command output buffer in `run_command_varg()`
- drop redundant condition in `run_command_varg()`
- replace `BUFSIZ` with literal sizes in `run_command_varg()`.

After this patch it's showing this in the CI log for the libgcrypt
fallout that previously needed a long time to diagnose:
```
61: ---- sshd log ----
61: No matching private key for certificate: /etc/ssh/ssh_host_mldsa44-ed25519_key-cert.pub
61: Server listening on 0.0.0.0 port 22.
61: Server listening on :: port 22.
61: debug1: sshd-session version OpenSSH_10.5, OpenSSL 3.6.3 9 Jun 2026
61: Connection from 172.17.0.1 port 51878 on 172.17.0.2 port 22 rdomain ""
61: debug1: sshd-auth version OpenSSH_10.5, OpenSSL 3.6.3 9 Jun 2026 [preauth]
61: debug1: list_hostkey_types: rsa-sha2-512,rsa-sha2-256,ssh-rsa,rsa-sha2-512-cert-v01@openssh.com,
rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,
ecdsa-sha2-nistp256-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com [preauth]
61: debug1: Local version string SSH-2.0-OpenSSH_10.5p1 Debian-1 [preauth]
61: debug1: Remote protocol version 2.0, remote software version libssh2_1.11.2_DEV [preauth]
61: debug1: compat_banner: no match: libssh2_1.11.2_DEV [preauth]
61: debug1: SSH2_MSG_KEXINIT sent [preauth]
61: debug1: SSH2_MSG_KEXINIT received [preauth]
61: debug1: kex: algorithm: (no match) [preauth]
61: Unable to negotiate with 172.17.0.1 port 51878: no matching key exchange method found.
Their offer: diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,
diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,
diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1,ext-info-c,
kex-strict-c-v00@openssh.com [preauth]
[...]
61: ------------------
```

Follow-up to 1d0b86ac84 #2484
Follow-up to 8be5716437 #2174
Follow-up to 51f6259d18 #1720

Closes #2621
2026-09-13 21:20:56 +02:00
Viktor Szakats
418c2a2a67 openssh_fixture: merge Apple container commands with others
Use the full `image pull`, `image tag` commands for docker and podman,
to make them all use the same commands.

Ref:
https://docs.docker.com/reference/cli/docker/image/pull/
https://docs.docker.com/reference/cli/docker/image/tag/

Follow-up to 9bd1f16dc2 #2605

Closes #2622
2026-09-13 18:52:20 +02:00
Viktor Szakats
1061e299f2 openssh_fixture: drop progress from image pull with Apple container
Follow-up to 9bd1f16dc2 #2605

Closes #2620
2026-09-13 18:10:47 +02:00
Viktor Szakats
14fbba968b tidy-up: prefer host key in two words for human-readable text
Closes #2618
2026-09-13 16:12:32 +02:00
Viktor Szakats
967a24b3bb tidy-up: miscellaneous
- wincng: add version comments.
  Follow-up to 7a26697ede #397
- wincng: fix two version support comments.
- tests/keys-generate.sh: add comment, newlines.
- mbedtls: casing in comment.
- wording: use `null-terminator` more.
- typos: `ssh-dss`.
- knownhost: drop obsolete comment.
- include/libssh2.h: clarify comments.
- include/libssh2.h: drop empty lines.
- libssh2_knownhost_writeline.md: fix grammar.
- GHA: reorder Cygwin settings, improve package search URL.
- fixup newlines.

Closes #2617
2026-09-13 16:12:32 +02:00
Viktor Szakats
f00f16e399 RELEASE-NOTES: sync [ci skip] 2026-09-13 15:03:52 +02:00
Viktor Szakats
f1572b2888 GHA/openssh_server: drop docker login Action, limit scope
In favor of direct execution or `docker login` and `docker logout`.

Also to limit the logged-in time to the steps the require it, and to
avoid passing a secret via the command-line.

Closes #2616
2026-09-13 14:50:26 +02:00
Viktor Szakats
520087ace4 spellcheck.sh: exclude test keys to avoid false positives
Follow-up to 5c50ea8a5d #2615
2026-09-13 14:28:02 +02:00
Viktor Szakats
781b6ca8a5 sshd_config: drop accidental ML-DSA change [ci skip]
Follow-up to 5c50ea8a5d #2615
2026-09-13 14:28:02 +02:00
Viktor Szakats
5c50ea8a5d tests: add ML-DSA host keys (not used or supported by libssh2)
Requires OpenSSH 10.3. As of 10.5, to enable in sshd, this patch needs
to be applied:

```diff
--- a/tests/openssh_server/sshd_config
+++ b/tests/openssh_server/sshd_config
@@ -3,9 +3,9 @@
 # SPDX-License-Identifier: BSD-3-Clause

 CASignatureAlgorithms +ssh-rsa
-HostKeyAlgorithms +ssh-rsa,ssh-rsa-cert-v01@openssh.com
+HostKeyAlgorithms +ssh-rsa,ssh-rsa-cert-v01@openssh.com,ssh-mldsa44-ed25519@openssh.com,ssh-mldsa44-ed25519-cert-v01@openssh.com
 # modern name in OpenSSH 8.5+: PubkeyAcceptedAlgorithms
-PubkeyAcceptedKeyTypes +ssh-rsa,ssh-rsa-cert-v01@openssh.com
+PubkeyAcceptedKeyTypes +ssh-rsa,ssh-rsa-cert-v01@openssh.com,ssh-mldsa44-ed25519@openssh.com,ssh-mldsa44-ed25519-cert-v01@openssh.com
 MACs +hmac-sha1,hmac-sha1-96,hmac-sha2-256,hmac-sha2-512,hmac-md5,hmac-md5-96,umac-64@openssh.com,umac-128@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-md5-etm@openssh.com,hmac-md5-96-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com
 Ciphers +3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com
 # for libgcrypt, WinCNG
```
2026-09-13 13:44:17 +02:00