Commit Graph

38365 Commits

Author SHA1 Message Date
renovate[bot]
44c19a2cce
GHA: update openssl/openssl to v3.6.2
Closes #21254
2026-04-07 16:09:51 +02:00
Daniel Stenberg
b168fc79ff
libssh: split myssh_statemach_act into sub functions and rename
Follow-up to bd3b2a626a

- rename it to myssh_statemachine

- remove the use of ternary operators in the switch

- fix the error handling for if 'sshp' actually ever is NULL

Closes #21250
2026-04-07 15:59:04 +02:00
Daniel Stenberg
a20989b82c
libssh2: split ssh_statemachine into more sub functions
The pieces of the state machine that were not separate functions before, now
are.

Also removed the use of ternary operators in the function calls.

Follow-up to f0bf43e209

Closes #21249
2026-04-07 14:50:42 +02:00
Daniel Stenberg
74a169575d
protocol: disable connection reuse for SMB(S)
Connections should only be reused when using the same "share" (and
perhaps some additional conditions), but instead of fixing this flaw,
this change completely disables connection reuse for SMB. This protocol
is about to get dropped soon anyway.

Reported-by: Osama Hamad
Closes #21238
2026-04-07 13:23:01 +02:00
Viktor Szakats
a0d5d8fea3
curl_ntlm_core: use wolfCrypt DES API with wolfSSL
Replacing the last uses of the OpenSSL compatibility API, and dropping
the redefinition of external symbols.

Closes #21247
2026-04-07 11:58:30 +02:00
Viktor Szakats
f974a00aba
lib: replace PRI*32 printf masks with C89 ones
Also: fix indent.

Follow-up to 13c1a93414 #20215

Closes #21234
2026-04-07 11:58:30 +02:00
renovate[bot]
f1e3091923
Dockerfile: update debian:bookworm-slim Docker digest to 4724b8c
Closes #21248
2026-04-07 07:50:19 +02:00
Daniel Stenberg
be92f0a2e4
lib: reserve 'result' for CURLcode, even more
Closes #21245
2026-04-07 07:48:58 +02:00
Viktor Szakats
fc3261b284
cmake: pre-fill HAVE_PIPE2 for two more platforms
For DragonFlyBSD and SunOS.

Also opt-in `BSD`, which is covering those listed explicitly, when using
CMake 3.25+.

Follow-up to 131a2fd5aa #16987

Closes #21243
2026-04-07 00:33:48 +02:00
Daniel Stenberg
9f5d1a38d1
lib: reserve 'result' for CURLcode
For consistency, whereever we use a local variable named 'result' that
is a CURLcode type. Make other types use other names.

Closes #21244
2026-04-06 23:12:06 +02:00
Daniel Stenberg
4cb4f9d602
cfilters: fix Curl_pollset_poll() return code mixup
Curl_conn_cf_poll did not map adjust_pollset failures to poll-style
errors properly, so error codes were treated as ready events.

Found by Codex Security

Closes #21231
2026-04-06 22:09:03 +02:00
Viktor Szakats
ecd09257d8
GHA/curl-for-win: drop certdata dependency and GITHUB_TOKEN with it
`certdata` dependency requires accessing api.github.com for
a reproducible timestamp, which in turn requires a GitHub token to avoid
errors due to rate limiting. Avoid all this by omitting this dependency,
which isn't necessary for these build tests anyway.

The `zero` job already did not use `certdata`, but disable explicitly
anyway just in case.

Reported-by: James Fuller

Follow-up to 9514184977
Follow-up to 128c252975 #21105

Closes #21241
2026-04-06 18:49:13 +02:00
Viktor Szakats
596f685da5
GHA: autoreconf downloaded tarballs where missing
To avoid using pre-built `./configure` scripts.

Also: drop unrecognized nettle `./configure` option.

Closes #21240
2026-04-06 18:49:13 +02:00
Viktor Szakats
7b96563a05
spacecheck.pl: fix to check 3+ newlines in all files
Follow-up to e52e6dac8e #20269

Closes #21237
2026-04-06 04:05:58 +02:00
Viktor Szakats
e078485b36
cmake: drop redundant condition
Follow-up to 43397b0283 #21015
Cherry-picked from #21000
2026-04-06 02:52:08 +02:00
Viktor Szakats
6e9df9f111
Makefile.am: replace stray := with = [ci skip]
`=` is used everywhere else in `Makefile.am` files.

Cherry-picked from #21000
2026-04-06 02:52:08 +02:00
Viktor Szakats
5fdb35a3bc
curl_setup.h: drop stray/unused USE_OPENSSL_QUIC guard
Follow-up to 6aaac9dd38 #20226

Closes #21235
2026-04-05 22:03:50 +02:00
Viktor Szakats
af08d642ea
man: fix argument type for CURLSHOPT_[UN]SHARE options
Closes #21232
2026-04-05 18:03:41 +02:00
Daniel Stenberg
f3176e0be8
CURLOPT_SOCKS5_AUTH.md: an access property
Reported-by: Cutiapreta on hackerone
Closes #21230
2026-04-05 17:47:57 +02:00
Viktor Szakats
8b50c9d1cc
GHA/windows: enable more options in 32-bit jobs
c-ares, gnutls, libssh, openssl.

Closes #21227
2026-04-05 17:41:11 +02:00
Daniel Stenberg
f22f08a0df
docs: noproxy wants the punycoded hostname version
Reported-by: Mehtab Zafar

Closes #21228
2026-04-05 16:53:09 +02:00
Viktor Szakats
20756bcf9a
libssh: fix 64-bit printf mask for mingw-w64 <=6.0.0
Fixing (dl-mingw, CM 6.4.0-i686 (mingw-w64 5.0.0) schannel !unity):
```
lib/vssh/libssh.c: In function 'myssh_in_SFTP_QUOTE_STATVFS':
lib/vssh/libssh.c:573:31: error: ISO C does not support the 'I' printf flag [-Werror=format=]
     char *tmp = curl_maprintf("statvfs:\n"
                               ^~~~~~~~~~~~
lib/vssh/libssh.c:573:31: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint64_t {aka long long unsigned int}' [-Werror=format=]
lib/vssh/libssh.c:573:31: error: ISO C does not support the 'I' printf flag [-Werror=format=]
[...]
```
Ref: https://github.com/curl/curl/actions/runs/24002480364/job/70000685821

mingw-w64 <=6.0.0 define `PRIu64` like this:
```
./inttypes.h:#define PRIu64 "I64u"
```

Follow-up to 413a0fedd0 #12346
Cherry-picked from #21227

Closes #21229
2026-04-05 16:45:30 +02:00
Daniel Stenberg
7813d9a077
share: do bitshifts after the type is checked to be valid
Fixes #21224
Reported-by: bird on github
Closes #21226
2026-04-05 16:07:54 +02:00
Viktor Szakats
8968a68eba
libssh: fix -Wsign-compare in 32-bit builds by dropping a redundant check
Follow-up to 8c8eeba522 #21214 (wrong silencing)
Follow-up to c049c37acd #18989 (add redundant check)
Follow-up to c988ec9f41 #9328 (make check fail)
Follow-up to 44a02d2532 #9324 (add original check)

Closes #21225
2026-04-05 15:23:02 +02:00
Viktor Szakats
acda4eae5e
runtests: allow configuring SSH host/client key algorithm
via env `CURL_TEST_SSH_KEYALGO`, `rsa` (default), `ecdsa`, `ed25519`.

To ease debugging and testing and to make these code paths more
universal.

Closes #21223
2026-04-05 11:19:42 +02:00
Daniel Stenberg
2e5d219205
sendf: fix CR detection if no LF is in the chunk
When doing line ending conversions, and a chunk contains no '\n', the
function returned early without updating prev_cr to reflect the last
byte. It could then lead to CRLFs sequences not get converted when
occuring right on the boundary border.

Found by Codex Security

Closes #21221
2026-04-04 22:32:54 +02:00
Viktor Szakats
ec22ea2502
GHA/windows: restore libssh, fix to pass tests with 0.12.0
libssh 0.12.0 on Windows 64-bit Intel fails to connect to sshd (with SSH
state 30) when using the mlkem768x25519-sha256 KEX. (32-bit Intel, ARM64
and tested non-Windows platforms work fine.) Fix by disabling this KEX
for the libssh job.

I do not recommend libssh on Windows due to bugs an insecure behavior.

Also:
- fix libssh TFLAGS condition for mingw-w64.

Follow-up to e127f8ce84 #21204
Follow-up to fcf946e846 #21195

Closes #21199
2026-04-04 18:34:13 +02:00
Viktor Szakats
c98d0a2e9a
sshserver.pl: add option to disable KEX algorithms in sshd
Cherry-picked from #21199

Closes #21220
2026-04-04 17:16:36 +02:00
Daniel Stenberg
741ee57375
doh: remove superfluous doh_req check
It has already been checked previously in the function.

Spotted by CodeSonar

Closes #21216
2026-04-04 17:10:37 +02:00
Daniel Stenberg
b669a58f2e
CURLOPT_UPLOAD_FLAGS.md: expand
And list each supported flag in a nicer way

Closes #21218
2026-04-04 17:09:23 +02:00
Daniel Stenberg
6d6d81e393
url: set default upload flags to CURLULFLAG_SEEN
As documented. Not doing this was a regression.

Follow-up to 6758aa722d

Reported by Codex Security

Closes #21217
2026-04-04 17:07:22 +02:00
Viktor Szakats
3b8bb1a86a
GHA/windows: bump OpenSSH-Windows to v10, other improvements
- use it in a mingw-w64 job.
- add support for native ARM64 binaries.
- add ability to use built-in OpenSSH server in mingw-w64 jobs.

Cherry-picked from #21199

Closes #21219
2026-04-04 15:52:44 +02:00
Viktor Szakats
f419afd058
GHA/windows: switch 3 mingw-w64 jobs to ucrt64
mingw-w64 (using msvcrt) is in legacy status.

Ref: https://www.msys2.org/docs/environments/

Closes #21213
2026-04-04 15:44:22 +02:00
Viktor Szakats
8c8eeba522
libssh: fix -Wsign-compare in 32-bit builds
Seen with mingw-w64 i686 gcc 15.2.0 (mingw32):
```
D:/a/curl/curl/lib/vssh/libssh.c: In function 'myssh_in_SFTP_QUOTE_STAT':
D:/a/curl/curl/lib/vssh/libssh.c:1664:13: error: comparison of integer expressions
  of different signedness: 'time_t' {aka 'long int'} and 'unsigned int' [-Werror=sign-compare]
 1664 |     if(date > UINT_MAX)
      |             ^
cc1.exe: all warnings being treated as errors
```
Ref: https://github.com/curl/curl/actions/runs/23966805891/job/69908216152

Cherry-picked from #21199

Closes #21214
2026-04-04 13:55:16 +02:00
Daniel Stenberg
d2110e7fcf
docs: CURLOPT_LOGIN_OPTIONS is a login property
Test case 1982 verifies this

Closes #21215
2026-04-04 12:37:39 +02:00
Daniel Stenberg
e96cb8b1d8
buildconf: remove
Not used since 85868537d6 (Aug 2020)

Removed from the release tarballs since 91fcbc5d1a (Aug 2024)

Closes #21210
2026-04-04 11:35:24 +02:00
Daniel Stenberg
b1784ead8e
RELEASE-NOTES: synced 2026-04-03 22:33:41 +02:00
Daniel Stenberg
1bf663e32f
dnscache: fix locking for negative caching
Reported-by: Izan on hackerone
Closes #21209
2026-04-03 22:27:59 +02:00
Samuel Henrique
f4eddde9dc
test 766: flag as timing-dependent
We have noticed this test as failing when run in parallel in Fedora and
Amazon Linux:
389f140954

Debian did not have issues but given there are other FTP tests flagged
as timing-dependent, it makes sense to flag this one too if we notice
failures in other OSes.

Closes #21155
2026-04-03 17:07:36 +02:00
Stefan Eissing
78e281bf6a
tool: fix retries in parallel mode
Verify that curl's --retry behaviour works

- test 502 in serial, works
- test 502 in parallel, hangs forver, test skipped by default
- test 401, no retries done

Fixes #20669
Reported-by: BlackFuffey on github
Closes #21206
2026-04-03 17:06:16 +02:00
Dan Fandrich
c54a3319ad CI: Fix or remove obsolete files in labeler config
Add a few more paths, too.
2026-04-02 10:11:42 -07:00
Daniel Stenberg
e65ba1bd34
hsts: make the HSTS read callback handle name dupes
Now the logic for handling name duplicates and picking the longest
expiry and strictest subdomain is the same for the callback as for when
reading from file.

Also strip trailing dots from the hostname added by the callback.

A minor side-effect is that the hostname provided by the callback can
now enable subdomains by starting the name with a dot, but we discourage
using such hostnames in documentation.

Amended test 1915 to verify.

Closes #21201
2026-04-02 18:01:20 +02:00
Viktor Szakats
dc20c91e04
GHA/windows: switch back to the canonical Cygwin mirror
The spare one is at the time of this patch inaccessible.

Follow-up to fb5541c28b #20583

Closes #21207
2026-04-02 17:00:05 +02:00
Viktor Szakats
e127f8ce84
GHA/windows: drop building with libssh
Bumping `msys2/setup-msys2` from 2.30.0 to 2.31.0 also brought libssh
0.12.0 (after 0.11.3). libssh has been long known for loading OpenSSH
configuration from disk insecurely on Windows. 0.12.0 brings some fixes
to this (CVE-2025-14821), which in turn may be changing its behavior on
the default GH Windows runner to fail all curl SCP/SFTP tests.

Detecting what is the exact root cause, then defining exact runtime
conditions for it is difficult and fragile. Same for changing these
libssh defaults (if at all possible.)

But, since configuration loading remains insecure and broken on Windows
even after the mitigations made by 0.12.0 [0], this patch removes libssh
from the Windows CI job using it previously.

If someone figures out how to run in CI, it can be readded, though in
general, using libssh on Windows seems to be less than ideal.

[0] 0e4bd38a5b/libssh.sh (L11-L94)

Refs:
https://www.libssh.org/2026/02/10/libssh-0-12-0-and-0-11-4-security-releases/
91382507d5
#21199 (unsuccessful fix attempts)

Bug: https://github.com/curl/curl/pull/21195#issuecomment-4173085194
Follow-up to fcf946e846 #21195

Closes #21204
2026-04-02 16:40:26 +02:00
Stefan Eissing
99d5b90878
asyn-thrdd: item cleanup using resolv_id
Now that we support multiple async operations at the same transfer,
fix the thread queue cleanup to match not only the mid but also the
resolv_id.

Found by Codex Security

Closes #21202
2026-04-02 13:15:53 +02:00
Stefan Eissing
33e43985b8
url: improve connection reuse on negotiate
Check state of negotiate to allow proper connection reuse.

Closes #21203
2026-04-02 13:14:29 +02:00
Daniel Stenberg
b27e828b93
url: init req.no_body in DO so that it works for h2 push
req.no_body was only initialized in Curl_connect, while HTTP/2 server
push adds a duplicated handle via Curl_multi_add_perform and calls
Curl_init_do with conn==NULL, never invoking Curl_connect.

Verify it by amending test 1620

Found by Codex Security

Closes #21194
2026-04-02 10:50:23 +02:00
Daniel Stenberg
93e80c75b4
hsts: accept 10K entries in the list
Up from 1K.

Reduces the risk that someone could flush the list by tricking a user to
do many transfers to new hostnames.

Document the limit.

Follow-up to 03a792b186

Closes #21200
2026-04-02 10:22:35 +02:00
Daniel Stenberg
d888a53e14
libssh: path length precaution
Make sure the string is non-zero before indexing it -1. Right now, the
path is always non-zero length so this is more for (future) safety
reasons.

Closes #21193
2026-04-02 09:55:25 +02:00
Dan Fandrich
38b626e790 CI: Improve labeler tag detection
Add entries for relevant new files added in the last two years.
2026-04-01 17:44:04 -07:00