]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
6 weeks agoTLSv1.3: reissue session ticket after full handshake on ciphersuite mismatch
Daniel Kubec [Mon, 30 Mar 2026 11:43:41 +0000 (13:43 +0200)] 
TLSv1.3: reissue session ticket after full handshake on ciphersuite mismatch

When session resumption falls back to a full handshake due to a ciphersuite
mismatch, ensure a new session ticket is issued with the newly negotiated
ciphersuite.

Fixes #18549

Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
MergeDate: Thu Apr 16 11:27:51 2026
(Merged from https://github.com/openssl/openssl/pull/30626)

6 weeks agossl: Fix ssl_do_config to clean up errors on success with ERR_set_mark
Gellért Peresztegi-Nagy [Fri, 10 Apr 2026 16:45:55 +0000 (17:45 +0100)] 
ssl: Fix ssl_do_config to clean up errors on success with ERR_set_mark

ssl_do_config() could leave stale errors on the error stack even on
success, so that later error checking operations could mistakenly
surface these errors. Use ERR_set_mark()/ERR_pop_to_mark() to cleanly
discard errors when the function succeeds or when system config errors
are non-fatal.

Fixes #30760

Co-authored-by: Brandon Allard <brandon@redpanda.com>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
MergeDate: Thu Apr 16 11:24:56 2026
(Merged from https://github.com/openssl/openssl/pull/30765)

6 weeks agoossl-guide-migration.pod: tfixes in TLS fixed ver meth deprecation desc
Eugene Syromiatnikov [Tue, 14 Apr 2026 09:50:40 +0000 (11:50 +0200)] 
ossl-guide-migration.pod: tfixes in TLS fixed ver meth deprecation desc

Change duplicating names of the suggested function names from TLS_* to DTLS_*
ones and fix the case of "API".

Co-Authored-by: Frederik Wedel-Heinen <frederik.wedel-heinen@dencrypt.dk>
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
MergeDate: Thu Apr 16 11:19:19 2026
(Merged from https://github.com/openssl/openssl/pull/30819)

6 weeks agoAdd regression tests to `test/evp_extra_test.c` that dynamically
jlg1061 [Mon, 2 Mar 2026 13:37:16 +0000 (13:37 +0000)] 
Add regression tests to `test/evp_extra_test.c` that dynamically
discover all provided ciphers with non-zero IV length and verify
correct multi-step initialization semantics.

The EVP API permits key and IV to be supplied in separate
`EVP_CipherInit_ex()` calls (e.g. key-only followed by IV-only).
A recent bug (PR #29934, ASCON-AEAD128) demonstrated that a
provider may silently ignore a key-only init, resulting in reuse
of a previously loaded key during a subsequent IV-only init.

To prevent similar regressions, this change introduces three
generic tests that automatically cover all IV-taking ciphers:

Verifies that:
- `init(key) → init(iv)`
- `init(iv) → init(key)`

produce identical ciphertext (and authentication tag for AEAD
ciphers) compared to single-call `init(key, iv)`.

Primes a context with `key1/iv1`, then re-initializes via
`init(key2) → init(iv2)` and verifies the output matches a fresh
`encrypt(key2, iv2)` operation, ensuring that no previously stored
key is reused.

Encrypts using single-call initialization and then decrypts using
multi-step initialization, verifying plaintext recovery. For AEAD
ciphers, this also exercises tag verification through the
multi-step path.

Ciphers are discovered using `EVP_CIPHER_do_all_provided()`,
requiring no maintenance when new IV-taking ciphers are added.
SIV mode is skipped due to its synthetic IV semantics. CCM mode
handling includes required length declarations.

This provides broad regression coverage for the provider
implementations that support multi-step EVP initialization.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Thu Apr 16 07:08:17 2026
(Merged from https://github.com/openssl/openssl/pull/30141)

6 weeks agoFix broken sslapitest with old FIPS providers
Tomas Mraz [Thu, 16 Apr 2026 05:47:01 +0000 (07:47 +0200)] 
Fix broken sslapitest with old FIPS providers

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Thu Apr 16 06:34:31 2026
(Merged from https://github.com/openssl/openssl/pull/30858)

6 weeks agotest/quicapitest.c: restore array formatting butchered by clang-format
Eugene Syromiatnikov [Thu, 26 Mar 2026 04:57:01 +0000 (05:57 +0100)] 
test/quicapitest.c: restore array formatting butchered by clang-format

Shut off clang-format, as it is incapable of formatting arrays properly,
and just mangles everything instead.  Also, while at it, drop the trailing
commas from TPARAM_CHECK_* definitions, as they are pretty confusing.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Wed Apr 15 12:45:37 2026
(Merged from https://github.com/openssl/openssl/pull/30580)

6 weeks agorun-checker-ci.yml, run-checker-merge: add -DOPENSSL_USE_IPV6=0
Eugene Syromiatnikov [Thu, 26 Mar 2026 04:55:23 +0000 (05:55 +0100)] 
run-checker-ci.yml, run-checker-merge: add -DOPENSSL_USE_IPV6=0

Add -DOPENSSL_USE_IPV6=0 to run-checker-ci.yml and move no-ui
to run-checker-merge.

References: https://github.com/openssl/openssl/issues/30574
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Wed Apr 15 12:45:34 2026
(Merged from https://github.com/openssl/openssl/pull/30580)

6 weeks agoAvoid creating TLSProxy on IPv6 loopback address is IPv6 is disabled
Eugene Syromiatnikov [Thu, 26 Mar 2026 04:52:40 +0000 (05:52 +0100)] 
Avoid creating TLSProxy on IPv6 loopback address is IPv6 is disabled

Add a parameter to TLSProxy::Proxy->new()
and TLSProxy::Proxy->new_dtls() that indicates IPv6 usage preference
and pass have_IPv6() to it, so IPv6 usage is avoided when it is disabled.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Wed Apr 15 12:45:33 2026
(Merged from https://github.com/openssl/openssl/pull/30580)

6 weeks agotest/quicapitest.c: skip test_quic_peer_addr_v6() if IPv6 is disabled
Eugene Syromiatnikov [Thu, 26 Mar 2026 04:40:04 +0000 (05:40 +0100)] 
test/quicapitest.c: skip test_quic_peer_addr_v6() if IPv6 is disabled

Define and add the test only if OPENSSL_USE_IPV6 is set to 1.

Resolves: https://github.com/openssl/openssl/issues/30574
Fixes: beec4e146a9e "Add SSL_get_peer_addr() function to query peer address for QUIC"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Wed Apr 15 12:45:31 2026
(Merged from https://github.com/openssl/openssl/pull/30580)

6 weeks agoinclude/openssl/x509_acert.h.in: add extern "C" linkage specification for C++
Eugene Syromiatnikov [Mon, 13 Apr 2026 12:11:49 +0000 (14:11 +0200)] 
include/openssl/x509_acert.h.in: add extern "C" linkage specification for C++

Fixes: dcee34c8f921 "Add RFC 5755 attribute certificate support"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Wed Apr 15 12:36:41 2026
(Merged from https://github.com/openssl/openssl/pull/30796)

6 weeks agodoc: clarify -hex option behavior in openssl prime
kovan [Mon, 2 Feb 2026 12:30:15 +0000 (13:30 +0100)] 
doc: clarify -hex option behavior in openssl prime

The -hex option description was ambiguous about its exact behavior.
Clarify that:
- With -generate: outputs the prime in hex instead of decimal
- When checking: interprets input as hex instead of decimal
- Output when checking is always hex regardless of this option

Fixes #19208

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Wed Apr 15 12:33:18 2026
(Merged from https://github.com/openssl/openssl/pull/29913)

6 weeks ago.github/workflows/coveralls.yml: move the master branch to the top of the matrix
Eugene Syromiatnikov [Mon, 13 Apr 2026 11:56:17 +0000 (13:56 +0200)] 
.github/workflows/coveralls.yml: move the master branch to the top of the matrix

So its config options can be copied into a newly created branch more naturally.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Wed Apr 15 12:30:38 2026
(Merged from https://github.com/openssl/openssl/pull/30785)

6 weeks ago.github/workflows/coveralls.yml: enable allocafil tests on openssl-4.0
Eugene Syromiatnikov [Mon, 13 Apr 2026 11:55:16 +0000 (13:55 +0200)] 
.github/workflows/coveralls.yml: enable allocafil tests on openssl-4.0

This really should have been done when the branch was added, but better
late than never.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Wed Apr 15 12:30:37 2026
(Merged from https://github.com/openssl/openssl/pull/30785)

6 weeks ago.github/workflows/coveralls.yml: add enable-lms to openssl-3.6 and openssl-4.0 configs
Eugene Syromiatnikov [Sun, 12 Apr 2026 14:59:19 +0000 (16:59 +0200)] 
.github/workflows/coveralls.yml: add enable-lms to openssl-3.6 and openssl-4.0 configs

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Wed Apr 15 12:30:35 2026
(Merged from https://github.com/openssl/openssl/pull/30785)

6 weeks ago.github/workflows/coveralls.yml: drop no-afalgeng from openssl-4.0 config
Eugene Syromiatnikov [Sun, 12 Apr 2026 14:58:35 +0000 (16:58 +0200)] 
.github/workflows/coveralls.yml: drop no-afalgeng from openssl-4.0 config

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Wed Apr 15 12:30:34 2026
(Merged from https://github.com/openssl/openssl/pull/30785)

6 weeks ago.github/workflows/coveralls.yml: drop EOL branches from the run matrix
Eugene Syromiatnikov [Sun, 12 Apr 2026 13:31:47 +0000 (15:31 +0200)] 
.github/workflows/coveralls.yml: drop EOL branches from the run matrix

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Wed Apr 15 12:30:33 2026
(Merged from https://github.com/openssl/openssl/pull/30785)

6 weeks agoDocument ASN1_BIT_STRING functions
Norbert Pocs [Tue, 31 Mar 2026 14:45:43 +0000 (16:45 +0200)] 
Document ASN1_BIT_STRING functions

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Wed Apr 15 12:25:45 2026
(Merged from https://github.com/openssl/openssl/pull/30690)

6 weeks agoUpdate S/MIME tool documentation
Taavi Eomäe [Thu, 26 Mar 2026 11:48:07 +0000 (13:48 +0200)] 
Update S/MIME tool documentation

CLA: trivial

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
MergeDate: Wed Apr 15 12:19:04 2026
(Merged from https://github.com/openssl/openssl/pull/30583)

6 weeks agodoc: clarify -CAfile and -verifyCAfile semantics in s_server
Josh Auler [Thu, 12 Mar 2026 05:07:42 +0000 (01:07 -0400)] 
doc: clarify -CAfile and -verifyCAfile semantics in s_server

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Wed Apr 15 12:11:34 2026
(Merged from https://github.com/openssl/openssl/pull/30405)

6 weeks agodoc: Clarify that BN_CTX must not be NULL for BN arithmetic functions
kovan [Tue, 27 Jan 2026 05:16:06 +0000 (06:16 +0100)] 
doc: Clarify that BN_CTX must not be NULL for BN arithmetic functions

The documentation for BN_add and related functions did not explicitly
state that the ctx parameter cannot be NULL. Users may assume NULL is
acceptable since some other OpenSSL functions allow it, but passing
NULL to functions like BN_mod_add() or BN_mod() causes a crash.

Update the documentation to explicitly state that ctx must not be NULL.

Fixes #12092

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Wed Apr 15 11:47:59 2026
(Merged from https://github.com/openssl/openssl/pull/29773)

6 weeks agoFix memory leak in ossl_uint_set_insert()
Alexandr Nedvedicky [Wed, 8 Apr 2026 09:55:24 +0000 (11:55 +0200)] 
Fix memory leak in ossl_uint_set_insert()

There is a missing call to OPENSSL_free() in the branch
where existing sets are merged to new range. There is
no evidence/POC OpenSSL poject is aware of the leak can
be triggered by QUIC protocol operation.

The issue has been kindly reported by Abhinav Agarwal (@abhinavagarwal07)

Fixes: c5ca718003e6 "uint_set: convert uint_set to use the list data type"
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr 15 11:28:41 2026
(Merged from https://github.com/openssl/openssl/pull/30718)

6 weeks agoriscv: fix missing VLEN >= 128 guard in AES-GCM dispatch
Christoph Müllner [Tue, 7 Apr 2026 21:05:24 +0000 (23:05 +0200)] 
riscv: fix missing VLEN >= 128 guard in AES-GCM dispatch

ossl_prov_aes_hw_gcm() returned &rv64i_zvkned_gcm when
RISCV_HAS_ZVKNED() was true but RISCV_HAS_ZVKB()/RISCV_HAS_ZVKG()
were false, without checking riscv_vlen() >= 128. All Zvkned
instructions require VLEN >= 128; on VLEN=64 hardware this would
cause illegal-instruction traps.

All other Zvk* dispatch sites already guard on riscv_vlen() >= 128.
Hoist the check to the outer if (RISCV_HAS_ZVKNED()) condition to
cover both return paths uniformly.

Fixes: d056e90ee58a "riscv: Provide vector crypto implementation of AES-GCM mode."
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Wed Apr 15 11:24:50 2026
(Merged from https://github.com/openssl/openssl/pull/30714)

6 weeks agoecp_s390x_nistp.c: reorder nullptr checks
Joshua Rogers [Sat, 4 Apr 2026 09:20:01 +0000 (17:20 +0800)] 
ecp_s390x_nistp.c: reorder nullptr checks

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr 15 11:01:22 2026
(Merged from https://github.com/openssl/openssl/pull/30648)

6 weeks agoecp_s390x_nistp.c: Reject negative digest length to prevent size_t underflow
Joshua Rogers [Tue, 31 Mar 2026 15:53:47 +0000 (23:53 +0800)] 
ecp_s390x_nistp.c: Reject negative digest length to prevent size_t underflow

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr 15 11:01:20 2026
(Merged from https://github.com/openssl/openssl/pull/30648)

6 weeks agoossl-guide-migration: Fix ASN1_STRING_ functions formatting
Jon Ericson [Tue, 7 Apr 2026 04:49:33 +0000 (21:49 -0700)] 
ossl-guide-migration: Fix ASN1_STRING_ functions formatting

keep bold and move to an unordered list

Co-authored-by: Tomáš Mráz <tm@t8m.info>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
MergeDate: Wed Apr 15 10:54:01 2026
(Merged from https://github.com/openssl/openssl/pull/30629)

6 weeks agoossl-guide-migration: delete duplicate entry
Jon Ericson [Tue, 31 Mar 2026 13:47:00 +0000 (06:47 -0700)] 
ossl-guide-migration: delete duplicate entry

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
MergeDate: Wed Apr 15 10:54:00 2026
(Merged from https://github.com/openssl/openssl/pull/30629)

6 weeks agoossl-guide-migration: Format function names correctly
Jon Ericson [Mon, 30 Mar 2026 17:05:14 +0000 (10:05 -0700)] 
ossl-guide-migration: Format function names correctly

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
MergeDate: Wed Apr 15 10:53:59 2026
(Merged from https://github.com/openssl/openssl/pull/30629)

6 weeks agoquic: fix channel leak when ossl_quic_provide_initial_secret fails
Sunwoo Lee [Fri, 27 Mar 2026 23:22:02 +0000 (08:22 +0900)] 
quic: fix channel leak when ossl_quic_provide_initial_secret fails

  In port_bind_channel(), when ossl_quic_provide_initial_secret()
  fails, the function returns without freeing the QUIC_CHANNEL
  that was just created by port_make_channel(). The caller sees
  new_ch == NULL and cannot free it, leaking the channel and all
  its sub-allocations (QRX, QTX, TXP, ACKM).

  Add ossl_quic_channel_free(ch) before the early return, matching
  the cleanup pattern already used by the other error paths in the
  same function (lines 864, 873).

  CWE-401

Reported-by: Sunwoo Lee <sunwoolee@kentech.ac.kr>
  CLA: trivial

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr 15 10:44:51 2026
(Merged from https://github.com/openssl/openssl/pull/30612)

6 weeks agoWork around "Use of uninitialized value..." in mkinstallvars.pl
Eugene Syromiatnikov [Fri, 10 Apr 2026 17:48:18 +0000 (19:48 +0200)] 
Work around "Use of uninitialized value..." in mkinstallvars.pl

Avoid "Use of uninitialized value in concatenation (.) or string
at util/mkinstallvars.pl line 139." message by supplying COMMENT
in the mkinstallvars.pl call exporters/build.info.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Tue Apr 14 08:54:11 2026
(Merged from https://github.com/openssl/openssl/pull/30768)

6 weeks agoNOTES-NONSTOP.md: remove the "Linking and Loading Considerations" section
Eugene Syromiatnikov [Sat, 11 Apr 2026 10:16:05 +0000 (12:16 +0200)] 
NOTES-NONSTOP.md: remove the "Linking and Loading Considerations" section

Since the atexit() handler setup was removed in [1], the section content
is no longer relevant;  remove it.

[1] https://github.com/openssl/openssl/pull/29385

References: https://github.com/openssl/openssl/issues/30742
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Tue Apr 14 08:50:36 2026
(Merged from https://github.com/openssl/openssl/pull/30776)

6 weeks agoINSTALL.md: mention that no-atexit has no effect
Eugene Syromiatnikov [Sat, 11 Apr 2026 10:14:42 +0000 (12:14 +0200)] 
INSTALL.md: mention that no-atexit has no effect

Since the atexit() handler was removed in [1], no-atexit configuration
option has no effect, so update the documentation accordingly.

[1] https://github.com/openssl/openssl/pull/29385

References: https://github.com/openssl/openssl/pull/30742
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Tue Apr 14 08:50:35 2026
(Merged from https://github.com/openssl/openssl/pull/30776)

6 weeks agoAdd docs for new atomic apis
Neil Horman [Thu, 2 Apr 2026 19:24:27 +0000 (15:24 -0400)] 
Add docs for new atomic apis

Documents CRYPTO_atomic_load_ptr(), CRYPTO_atomic_store_ptr() and
CRYPTO_atomic_cmp_exch_ptr()

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Tue Apr 14 08:29:33 2026
(Merged from https://github.com/openssl/openssl/pull/30670)

6 weeks agoRun make update
Neil Horman [Thu, 2 Apr 2026 19:23:47 +0000 (15:23 -0400)] 
Run make update

Adds CRYPTO_atomic_load_ptr, CRYPTO_atomic_store_ptr and
CRYPTO_atomic_cmp_exch_ptr

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Tue Apr 14 08:29:32 2026
(Merged from https://github.com/openssl/openssl/pull/30670)

6 weeks agoconvert rand_meth_lock to atomics
Neil Horman [Wed, 1 Apr 2026 18:37:52 +0000 (14:37 -0400)] 
convert rand_meth_lock to atomics

Using our previously created atomic ops, we can (almost) eliminate the
use of the rand_meth_lock.  This lock guards reads/write on the
RAND_default_meth global variable, which is generally written only once
during a process lifetime.  By replacing the lock with an atomic read
for reads, and an atomic compare and exchange or atomic store for
writes, we can significantly improve the execution time of
RAND_get_rand_method, which is called every time a process calls
RAND_bytes_ex()

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Tue Apr 14 08:29:31 2026
(Merged from https://github.com/openssl/openssl/pull/30670)

6 weeks agoAdd some crypto atomic pointer ops
Neil Horman [Wed, 1 Apr 2026 16:32:40 +0000 (12:32 -0400)] 
Add some crypto atomic pointer ops

CRYPTO_atomic_load_ptr - load a pointer value with relaxed semantics
CRYPTO_atomic_store_ptr - store a pointer value with relaxed semantics
CRYPTO_atomic_cmp_exch_ptr - cmp/exch a pointer with relaxed or acq/rel
                             semantics

The addition of these functions enables us to better use atomics to
replace read/write locks where we are almost always doing reads

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Tue Apr 14 08:29:30 2026
(Merged from https://github.com/openssl/openssl/pull/30670)

6 weeks agoppc64le: Optimized MLKEM NTT, supports p8 (ISA 2.07) and above architectures.
Danny Tsen [Tue, 7 Apr 2026 13:19:05 +0000 (09:19 -0400)] 
ppc64le: Optimized MLKEM NTT, supports p8 (ISA 2.07) and above architectures.

Optimized MKEM NTT implementation for ppc64le for ISA 2.07 and above architectures.

Supporting files include,
asm/mlkem_ntt_ppc64le.S: supports NTT.
asm/mlkem_intt_ppc64le.S: supports inverse NTT.
asm/mlkem_ppc_macros_asm.S: PPC64LE macros.

Modified build.info to support ppc64le assembly implementation.
Added new definitions of MLKEM_NTT_ASM for NTT and inverse NTT for
optimized assembly implementation.

This is the initial archtecture specific implementation so can be mdified
to adapt to a new build structures.

Baseline speed test:
                               keygen    encaps    decaps keygens/s  encaps/s  decaps/s
                 ML-KEM-512 0.000037s 0.000030s 0.000046s   26744.7   33529.5   21875.6
                 ML-KEM-768 0.000059s 0.000043s 0.000066s   16836.6   23118.8   15198.3
                ML-KEM-1024 0.000088s 0.000060s 0.000089s   11406.2   16749.7   11265.8

Optimized:
                               keygen    encaps    decaps keygens/s  encaps/s  decaps/s
                 ML-KEM-512 0.000023s 0.000015s 0.000022s   42789.9   65006.8   46064.6
                 ML-KEM-768 0.000038s 0.000023s 0.000032s   25983.3   43731.1   31254.7
                ML-KEM-1024 0.000060s 0.000033s 0.000045s   16662.7   30708.2   22034.6

The optimized code runs around 1.9 times faster than the original C implementation.

Tested-by: Eugene Syromiatnikov <esyr@openssl.org>
Signed-off-by: Danny Tsen <dtsen@us.ibm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Tue Apr 14 08:23:42 2026
(Merged from https://github.com/openssl/openssl/pull/30709)

6 weeks agoinclude C++ extern in ech.h
sftcd [Mon, 13 Apr 2026 00:43:04 +0000 (01:43 +0100)] 
include C++ extern in ech.h

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Mon Apr 13 09:57:10 2026
(Merged from https://github.com/openssl/openssl/pull/30790)

6 weeks agoSkip parsing OCSP status_request when no status call is registered
Brenda So [Mon, 30 Mar 2026 21:32:47 +0000 (14:32 -0700)] 
Skip parsing OCSP status_request when no status call is registered

When no ext.status_cb is set, the server will not produce a stapled
OCSP response. This patch returns early from tls_parse_ctos_status_request
before parsing the extension body to save memory.

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Mon Apr 13 09:40:08 2026
(Merged from https://github.com/openssl/openssl/pull/30630)

6 weeks agoWe now have ml-dsa asm, add it to fips-checksums
Tomas Mraz [Thu, 19 Mar 2026 09:58:56 +0000 (10:58 +0100)] 
We now have ml-dsa asm, add it to fips-checksums

We also add other PQC algorithm directories that might
appear in future so they are picked-up by the script
once they appear. This requires checking whether the
directory exists.

Also update the fips sources and checksums.

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Mon Apr 13 09:35:17 2026
(Merged from https://github.com/openssl/openssl/pull/30502)

6 weeks agoapps : enforce command-line parameter checking.
F. R. Da Silva [Thu, 26 Mar 2026 23:09:23 +0000 (00:09 +0100)] 
apps : enforce command-line parameter checking.

Improve 'verify' option help messages.

integer value parsing formats are:
- 'n' is any integer
- 'N' is a non-negative integer (i.e. value >= 0)
- 'p' is a positive integer (i.e. value > 0)

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
MergeDate: Mon Apr 13 09:30:22 2026
(Merged from https://github.com/openssl/openssl/pull/30476)

6 weeks agoapps: remove atoi() calls.
Filipe R. Da Silva [Sun, 15 Mar 2026 20:55:42 +0000 (21:55 +0100)] 
apps: remove atoi() calls.

Related to #8216

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
MergeDate: Mon Apr 13 09:30:21 2026
(Merged from https://github.com/openssl/openssl/pull/30476)

6 weeks agoPrecompute some helper objects in each SSL_CTX
Viktor Dukhovni [Tue, 7 Apr 2026 11:46:58 +0000 (21:46 +1000)] 
Precompute some helper objects in each SSL_CTX

Instead of repeated fetching, precompute the below per the library
context and properties of the SSL_CTX and use them for the lifetime of
the SSL_CTX.

    - HMAC algorithm handle (session ticket HMAC)
    - SHA2-256 algorithm handle (session ticket HMAC)
    - AES_256-CBC algorithm handle (session ticket en/decryption)
    - TLS1 PRF (when TLS <= 1.2 is supported)

The "sha1" and "md5" handles are no longer used, and those fields are
removed.

The `SSL_HMAC` objects used internally are now stack allocated, and the
associated "new" and "free" functions are now called "construct" and
"destruct" respectively.

Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Mon Apr 13 09:03:45 2026
(Merged from https://github.com/openssl/openssl/pull/30696)

6 weeks agoFix no-dtls1_2 test failure
Matt Caswell [Tue, 7 Apr 2026 14:39:42 +0000 (15:39 +0100)] 
Fix no-dtls1_2 test failure

Fix a failure with no-dtls1_2 introduced by the test in #30503

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Mon Apr 13 08:59:03 2026
(Merged from https://github.com/openssl/openssl/pull/30704)

6 weeks agoci: Use jom to parallize Windows builds
Milan Broz [Sun, 5 Apr 2026 19:24:28 +0000 (21:24 +0200)] 
ci: Use jom to parallize Windows builds

The jom version in choco install is obsolete,
but it works fine for CI.

Users should use jom 1.1.7 or more recent.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Mon Apr 13 08:46:21 2026
(Merged from https://github.com/openssl/openssl/pull/30703)

6 weeks agoWindows: Use /Z7 compiler flag to enable parallel builds
Milan Broz [Thu, 2 Apr 2026 10:51:46 +0000 (12:51 +0200)] 
Windows: Use /Z7 compiler flag to enable parallel builds

MSVC compilation on Windows cannot be reliably parallelized
with tools like jom (an nmake replacement) due to contention
on shared .pdb files used for debug info. Writes to a shared
.pdb must be serialized.

The /FS compiler flag serializes concurrent compiler writes,
but does not resolve contention when the compiler and linker
access the same .pdb file. With shared .pdb files (e.g. app.pdb),
the makefile does not prevent races between the linker and
compilation of multiple targets.

This can be resolved either by restructuring the makefile
to introduce sentinel dependencies that serialize the conflicting
steps, or by eliminating the shared .pdb entirely.

This patch takes the latter approach: it replaces /Zi with /Z7,
which embeds debug info directly into each .obj file and avoids
any shared-file contention. /Z7 is supported by all MSVC versions.

The linker-generated .pdb is unaffected.

Side effects: object files are slightly larger, and all .pdb files
are now named after their target — the shared app.pdb, ossl_static.pdb,
and dso.pdb no longer exist.

With this change, jom can be used to parallelize the build.

Fixes: #9931
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Mon Apr 13 08:46:20 2026
(Merged from https://github.com/openssl/openssl/pull/30703)

6 weeks agoOSSL_PARAM_BLD_push_octet_*(): Allow NULL buffer with 0 bsize
Tomas Mraz [Wed, 8 Apr 2026 15:38:51 +0000 (17:38 +0200)] 
OSSL_PARAM_BLD_push_octet_*(): Allow NULL buffer with 0 bsize

Fixes #30728

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Mon Apr 13 07:47:44 2026
(Merged from https://github.com/openssl/openssl/pull/30730)

6 weeks agoRemove duplicate function asn1_bit_string_set_unused_bits
Norbert Pocs [Mon, 6 Apr 2026 12:34:08 +0000 (14:34 +0200)] 
Remove duplicate function asn1_bit_string_set_unused_bits

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Mon Apr 13 07:11:12 2026
(Merged from https://github.com/openssl/openssl/pull/30746)

6 weeks agoRename ossl_asn1_string_set_bits_left to something more expressive
Norbert Pocs [Mon, 6 Apr 2026 12:30:03 +0000 (14:30 +0200)] 
Rename ossl_asn1_string_set_bits_left to something more expressive

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Mon Apr 13 07:11:11 2026
(Merged from https://github.com/openssl/openssl/pull/30746)

6 weeks agoquic: fix NULL txl dereference in qtx_resize_txe
Nikolas Gauder [Tue, 17 Mar 2026 19:29:28 +0000 (20:29 +0100)] 
quic: fix NULL txl dereference in qtx_resize_txe

Fixes: 1957148384c7 "QUIC Record Layer (Refactor and TX Side)"
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Sat Apr 11 20:55:10 2026
(Merged from https://github.com/openssl/openssl/pull/30474)

6 weeks agostyle: fix clang-format issues in chacha_internal_test.c
Samaresh Kumar Singh [Thu, 2 Apr 2026 20:16:56 +0000 (15:16 -0500)] 
style: fix clang-format issues in chacha_internal_test.c

Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Sat Apr 11 20:06:07 2026
(Merged from https://github.com/openssl/openssl/pull/30587)

6 weeks agotest/chacha: added ELFv2 ABI FPR preservation check for POWER10 8x path
Samaresh Kumar Singh [Sat, 28 Mar 2026 21:38:35 +0000 (16:38 -0500)] 
test/chacha: added ELFv2 ABI FPR preservation check for POWER10 8x path

On POWER10, ChaCha20_ctr32_vsx_8x is activated for buffers over 255
bytes and uses vxxlor to alias FPR14-FPR25 as temporary storage. Add a
test to chacha_internal_test that pins known values in f14-f25 via
inline asm, calls through ChaCha20_ctr32 with a 512-byte buffer to
trigger the 8x path, and verifies the registers still hold their
original values. The test is gated on PPC_BRD31 (POWER10 capability
flag) so it is skipped silently on older hardware.

Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Sat Apr 11 20:06:05 2026
(Merged from https://github.com/openssl/openssl/pull/30587)

6 weeks agochacha/asm: save f17 in 8x prologue for contiguous f14-f25 range
Samaresh Kumar Singh [Sat, 28 Mar 2026 19:43:47 +0000 (14:43 -0500)] 
chacha/asm: save f17 in 8x prologue for contiguous f14-f25 range

f17 is not directly clobbered by any vxxlor in this function, but
saving the full contiguous range f14-f25 is cleaner and avoids any
future ambiguity if the code is modified. Adjust all subsequent FPR
slot offsets and the VMX base offset accordingly, and update the frame
size comment.

Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Sat Apr 11 20:06:04 2026
(Merged from https://github.com/openssl/openssl/pull/30587)

6 weeks agochacha/asm: fix ELFv2 ABI violation in ChaCha20_ctr32_vsx_8x
Samaresh Kumar Singh [Thu, 26 Mar 2026 14:19:22 +0000 (09:19 -0500)] 
chacha/asm: fix ELFv2 ABI violation in ChaCha20_ctr32_vsx_8x

The 8-block POWER10 ChaCha20 path uses vxxlor to spill VMX values into
VSR0-VSR26, which aliases FPR0-FPR26. FPR14-FPR31 are callee-saved per
the ELFv2 ABI, but the function was never saving or restoring them,
silently corrupting 11 FPRs (12 on big-endian) across any call with a
buffer larger than 255 bytes. VMX registers v20-v23, also
callee-saved, had the same problem.

Fix by increasing the frame size to accommodate save slots for
FPR14-FPR25 (and FPR26 on BE) and VMX v20-v23, and adding the
corresponding stfd/lfd and stvx/lvx pairs in the prologue and
epilogue. The VRSAVE save offset is updated to a fixed expression so
it stays clear of the new save area.

Fix for the bug #30584

Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Sat Apr 11 20:06:02 2026
(Merged from https://github.com/openssl/openssl/pull/30587)

6 weeks agodoc: updates no-pinshared description
Ethan [Fri, 27 Mar 2026 19:15:52 +0000 (15:15 -0400)] 
doc: updates no-pinshared description

The current documentation heavily references the now removed
`atexit()` handlers. This updates the description to better reflect
it's current utility (removal of `-Wl,-znodelete` linker flags on
Linux and Hurd).

Fixes #30586

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Sat Apr 11 19:44:00 2026
(Merged from https://github.com/openssl/openssl/pull/30606)

7 weeks agoSetting statem.error_state more carefully
Igor Ustinov [Tue, 31 Mar 2026 14:35:49 +0000 (16:35 +0200)] 
Setting statem.error_state more carefully

Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Sat Apr 11 19:31:39 2026
(Merged from https://github.com/openssl/openssl/pull/30647)

7 weeks agoSSL_use_cert_and_key NPE with provided keys
Viktor Dukhovni [Sat, 4 Apr 2026 14:19:07 +0000 (01:19 +1100)] 
SSL_use_cert_and_key NPE with provided keys

SSL_use_cert_and_key(3) dereferenced a NULL SSL_CTX pointer
via ssl_cert_lookup_by_pkey() when the private key type was
not one of the builtin ones, but was provider-based.

Bug introduced in Postfix 3.2 (commit ee58915cfd9).

Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Sat Apr 11 19:04:12 2026
(Merged from https://github.com/openssl/openssl/pull/30683)

7 weeks agoCHANGES.md, NEWS.md: update for 3.6.2
Eugene Syromiatnikov [Sun, 5 Apr 2026 10:54:45 +0000 (12:54 +0200)] 
CHANGES.md, NEWS.md: update for 3.6.2

3.6.2 CHANGES.md includes the following:
 * CVE-2026-2673, CVE-2026-28386, CVE-2026-28387, CVE-2026-28388,
   CVE-2026-28389, CVE-2026-28390, CVE-2026-31789, CVE-2026-31790
 * https://github.com/openssl/openssl/pull/30384
   "Fix #19891 CONNECT request for IPv6 targets in OSSL_HTTP_proxy_connect"
 * https://github.com/openssl/openssl/pull/30411
   "Fix detection of plaintext HTTP over TLS (3.6/3.5 backport)"
 * https://github.com/openssl/openssl/pull/30557
   "re-constructorize the cpuid stuff, but fix riscv to not depend
   on BIO_snprintf."

3.6.2 NEWS.md includes the following:
 * CVE-2026-2673, CVE-2026-28386, CVE-2026-28387, CVE-2026-28388,
   CVE-2026-28389, CVE-2026-28390, CVE-2026-31789, CVE-2026-31790

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Sat Apr 11 18:51:42 2026
(Merged from https://github.com/openssl/openssl/pull/30720)

7 weeks agocurl ECH+QUIC fix
sftcd [Wed, 8 Apr 2026 10:11:37 +0000 (11:11 +0100)] 
curl ECH+QUIC fix

Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
MergeDate: Sat Apr 11 18:29:37 2026
(Merged from https://github.com/openssl/openssl/pull/30727)

7 weeks agoFix off-by-one s_client overflows
Matt Caswell [Wed, 8 Apr 2026 15:36:42 +0000 (16:36 +0100)] 
Fix off-by-one s_client overflows

There are one byte buffer overflows possible in s_client's handling
of STARTTLS in various protocols. If a server's response fills the entire
buffer (16k) then we attempt to add a NUL terminator one byte off the end
of the buffer.

This was reported by Igor Morgenstern from AISLE to openssl-security and
assessed by the security team as "bug or hardening only".

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Sat Apr 11 16:16:24 2026
(Merged from https://github.com/openssl/openssl/pull/30731)

7 weeks agoUpdate apps/lib/s_cb.c
Sashan [Wed, 1 Apr 2026 06:32:46 +0000 (08:32 +0200)] 
Update apps/lib/s_cb.c

Co-authored-by: Bob Beck <beck@obtuse.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Apr 10 12:22:48 2026
(Merged from https://github.com/openssl/openssl/pull/30596)

7 weeks agoUpdate apps/lib/s_cb.c
Sashan [Wed, 1 Apr 2026 06:28:31 +0000 (08:28 +0200)] 
Update apps/lib/s_cb.c

Co-authored-by: Bob Beck <beck@obtuse.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Apr 10 12:22:46 2026
(Merged from https://github.com/openssl/openssl/pull/30596)

7 weeks agofix BIO_vsnprintf() with NULL string arg crash on Solaris 10
Alexandr Nedvedicky [Fri, 27 Mar 2026 08:33:07 +0000 (09:33 +0100)] 
fix BIO_vsnprintf() with NULL string arg crash on Solaris 10

Issue was kindly reported and fixes suggested by @rainerjung

Fixes #30402

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Apr 10 12:22:44 2026
(Merged from https://github.com/openssl/openssl/pull/30596)

7 weeks agoImprove PBKDF2 password strength too weak error message with arguments 30757/head
Jun Aruga [Mon, 30 Mar 2026 17:21:18 +0000 (18:21 +0100)] 
Improve PBKDF2 password strength too weak error message with arguments

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Wed Apr  8 10:34:20 2026
(Merged from https://github.com/openssl/openssl/pull/30628)

7 weeks agoevp_skey_test.c: Add test for EVP_SKEY_to_provider cross-provider transfer
Joshua Rogers [Sat, 4 Apr 2026 10:28:46 +0000 (18:28 +0800)] 
evp_skey_test.c: Add test for EVP_SKEY_to_provider cross-provider transfer

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
MergeDate: Wed Apr  8 10:27:04 2026
(Merged from https://github.com/openssl/openssl/pull/30650)

7 weeks agoevp_skey_test.c: Add test for EVP_SKEY_to_provider same-provider path
Joshua Rogers [Sat, 4 Apr 2026 09:55:34 +0000 (17:55 +0800)] 
evp_skey_test.c: Add test for EVP_SKEY_to_provider same-provider path

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
MergeDate: Wed Apr  8 10:27:03 2026
(Merged from https://github.com/openssl/openssl/pull/30650)

7 weeks agos_lib.c: Fix refcount leak in EVP_SKEY_to_provider
Joshua Rogers [Tue, 31 Mar 2026 16:02:11 +0000 (00:02 +0800)] 
s_lib.c: Fix refcount leak in EVP_SKEY_to_provider

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
MergeDate: Wed Apr  8 10:27:02 2026
(Merged from https://github.com/openssl/openssl/pull/30650)

7 weeks agoOPENSSL_secure_malloc.pod: mention CRYPTO_secure_actual_size()
Eugene Syromiatnikov [Mon, 30 Mar 2026 08:30:41 +0000 (10:30 +0200)] 
OPENSSL_secure_malloc.pod: mention CRYPTO_secure_actual_size()

Add mentions to NAME, SYNOPSIS, and RETURN VALUES, and provide a short
description (that it is identical to its OPENSSL_* counterpart)
to DESCRIPTION.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:23:57 2026
(Merged from https://github.com/openssl/openssl/pull/30623)

7 weeks agoOPENSSL_malloc.pod: mention CRYPTO_memdup()
Eugene Syromiatnikov [Mon, 30 Mar 2026 08:27:35 +0000 (10:27 +0200)] 
OPENSSL_malloc.pod: mention CRYPTO_memdup()

Add its mentions to NAME, SYNOPSIS, and RETURN VALUES sections.
Also, while at it, put OPENSSL_{str,strn,mem}dup() with the other
OPENSSL_* interfaces, and add mentions of OPENSSL_str{,n}dup()
to RETURN VALUES.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:23:55 2026
(Merged from https://github.com/openssl/openssl/pull/30623)

7 weeks agoOPENSSL_malloc.pod: mention CRYPTO_aligned_alloc{,_array}() in RETURN VALUES
Eugene Syromiatnikov [Mon, 30 Mar 2026 08:10:35 +0000 (10:10 +0200)] 
OPENSSL_malloc.pod: mention CRYPTO_aligned_alloc{,_array}() in RETURN VALUES

Addition of those has been originally overlooked.

Complements: cc4ea5e00028 "Introduce new internal hashtable implementation"
Complements: fa9b7b930e3e "Add array memory allocation routines"
Complements: 14a24fd14ff7 "doc/man3/OPENSSL_malloc.pod: explicitly document freeptr value on failures"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:23:55 2026
(Merged from https://github.com/openssl/openssl/pull/30623)

7 weeks agoquic: remove unused scid from port_default_packet_handler
Sunwoo Lee [Fri, 27 Mar 2026 23:58:41 +0000 (08:58 +0900)] 
quic: remove unused scid from port_default_packet_handler

  Remove the scid variable entirely from port_default_packet_handler()
  and all functions that accept it as a parameter. The scid was never
  used meaningfully — cur_remote_dcid is set later during the handshake.

  Remove scid parameter from:
    - port_bind_channel()
    - port_validate_token()
    - ossl_quic_channel_on_new_conn()
    - ossl_quic_bind_channel()
    - ch_on_new_conn_common()

  Remove the cur_remote_dcid = *peer_scid assignment in
  ch_on_new_conn_common() as it wrote dead data.

  CWE-457

Reported-by: Sunwoo Lee <sunwoolee@kentech.ac.kr>
  CLA: trivial

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:21:55 2026
(Merged from https://github.com/openssl/openssl/pull/30611)

7 weeks agocrypto/pkcs12/p12_add.c: Restore ERR_set_mark and ERR_pop_to_mark
Jun Aruga [Fri, 27 Mar 2026 18:16:55 +0000 (18:16 +0000)] 
crypto/pkcs12/p12_add.c: Restore ERR_set_mark and ERR_pop_to_mark

The commit <2ea6e785f526f88f913cc6f49372aae9dc54bc63> removed the
ERR_set_mark and ERR_pop_to_mark calls before and after the EVP_CIPHER_fetch
call in several files.

However, in PKCS12_pack_p7encdata_ex, crypto/pkcs12/p12_add.c, there is a valid
case that EVP_CIPHER_fetch returns NULL, raising an error, and calls
PKCS5_pbe_set_ex. The case is such as PBE-SHA1-3DES.

PKCS12_pack_p7encdata_ex, crypto/pkcs12/p12_add.c:
```
...
    pbe_ciph = EVP_CIPHER_fetch(ctx, OBJ_nid2sn(pbe_nid), propq);

    if (pbe_ciph != NULL) {
        pbe = PKCS5_pbe2_set_iv_ex(pbe_ciph, iter, salt, saltlen, NULL, -1, ctx);
    } else {
        pbe = PKCS5_pbe_set_ex(pbe_nid, iter, salt, saltlen, ctx);
    }
...
```

So, we need to restore ERR_set_mark and ERR_pop_to_mark calls before and after
the EVP_CIPHER_fetch call for this case.

A reproducer is below.

```
$ openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -nodes \
  -subj "/CN=Test" 2> /dev/null
$ openssl pkcs12 \
    -export -in cert.pem -inkey key.pem -out test.p12 -passout pass: \
    -keypbe PBE-SHA1-3DES -certpbe PBE-SHA1-3DES
40276EC7677F0000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:crypto/evp/evp_fetch.c:376:Global default library context, Algorithm (PBE-SHA1-3DES : 0), Properties (<null>)
$ echo $?
0
```

80-test_pkcs12.t: Add test_pkcs12_passcerts_legacy_outerr2_empty test to test
this change.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
MergeDate: Wed Apr  8 10:09:07 2026
(Merged from https://github.com/openssl/openssl/pull/30607)

7 weeks agoquic_channel.c: avoid clipping in ack_delay_exponent/disable_active_migration setters
Eugene Syromiatnikov [Wed, 18 Mar 2026 09:13:26 +0000 (10:13 +0100)] 
quic_channel.c: avoid clipping in ack_delay_exponent/disable_active_migration setters

Avoid clipping of the provided values in setters due to type casting
by checking the values agains the type-specific maximum beforehand.

Fixes: 35dc6c353bfe "QUIC: Make more transport parameters configurable"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:05:27 2026
(Merged from https://github.com/openssl/openssl/pull/30485)

7 weeks agoquic_channel.c: avoid integer overflow in ossl_quic_channel_set_max_data_request
Eugene Syromiatnikov [Wed, 18 Mar 2026 09:03:08 +0000 (10:03 +0100)] 
quic_channel.c: avoid integer overflow in ossl_quic_channel_set_max_data_request

Check that DEFAULT_CONN_RXFC_MAX_WND_MUL * max_data multiplication
will not overflow uint64_t data type before performing it.

Fixes: 35dc6c353bfe "QUIC: Make more transport parameters configurable"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:05:26 2026
(Merged from https://github.com/openssl/openssl/pull/30485)

7 weeks agoquic_channel.c: check the setters return values
Eugene Syromiatnikov [Wed, 18 Mar 2026 08:59:31 +0000 (09:59 +0100)] 
quic_channel.c: check the setters return values

...and call them before updating QUIC_CHANNEL parameters.
Unchecked return value has been initially reported by Coverity
for ossl_quic_rxfc_init() call in ossl_quic_channel_set_max_data_request(),
but also seems to be relevant for ossl_quic_channel_set_max_streams_request()
and ossl_quic_channel_set_ack_delay_exponent_request().

Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1689768
Fixes: 35dc6c353bfe "QUIC: Make more transport parameters configurable"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:05:25 2026
(Merged from https://github.com/openssl/openssl/pull/30485)

7 weeks agoDeprecate EVP_CIPHER_CTX_get_num() and EVP_CIPHER_CTX_set_num().
slontis [Tue, 10 Mar 2026 03:17:55 +0000 (14:17 +1100)] 
Deprecate EVP_CIPHER_CTX_get_num() and EVP_CIPHER_CTX_set_num().

Suggested to be added in OpenSSL 4.1.
Since engines have been removed, these are redundant functions.
End users should not generally be accessing this internal field.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:02:58 2026
(Merged from https://github.com/openssl/openssl/pull/30335)

7 weeks agoNEWS.md: Update 3.6.0 release date
Eugene Syromiatnikov [Sun, 5 Apr 2026 11:28:27 +0000 (13:28 +0200)] 
NEWS.md: Update 3.6.0 release date

Original-Commit: 7b371d80d959 "Prepare for release of 3.6.0"

Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:00:08 2026
(Merged from https://github.com/openssl/openssl/pull/30686)

7 weeks agoCHANGES.md: move SSL_{add,set}1_{dnsname,ipaddr} entry to 4.0 section
Eugene Syromiatnikov [Sun, 5 Apr 2026 11:20:41 +0000 (13:20 +0200)] 
CHANGES.md: move SSL_{add,set}1_{dnsname,ipaddr} entry to 4.0 section

Also reword it to match the style of other entries.

Complements: cb1645e83bd9 "Add a changes entry"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:00:06 2026
(Merged from https://github.com/openssl/openssl/pull/30686)

7 weeks agoCHANGES.md: move SSL_CTX_is_server() entry to the 4.0 section
Eugene Syromiatnikov [Sun, 5 Apr 2026 11:18:25 +0000 (13:18 +0200)] 
CHANGES.md: move SSL_CTX_is_server() entry to the 4.0 section

Also reword it to match the style of other entries.

Complements: ca20e54e8674 "SSL_CTX_is_server() was added."
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:00:05 2026
(Merged from https://github.com/openssl/openssl/pull/30686)

7 weeks agoMake ext argument of X509V3_EXT_print_fp const
Arne Schwabe [Wed, 25 Mar 2026 15:28:46 +0000 (16:28 +0100)] 
Make ext argument of X509V3_EXT_print_fp const

Commit e75bd84ffc7 made the ext argument of 509V3_EXT_print const
but did not give 509V3_EXT_print_fp which is essentially is a wrapper
around X509V3_EXT_print the same treatment.

This commit aligns the two functions again.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 09:15:11 2026
(Merged from https://github.com/openssl/openssl/pull/30572)

7 weeks agoFix documentation of SSL_ech_get1_status() return values
Tomas Mraz [Fri, 3 Apr 2026 14:18:52 +0000 (16:18 +0200)] 
Fix documentation of SSL_ech_get1_status() return values

Also do minor formatting cleanups on the man page.

Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Wed Apr  8 09:13:38 2026
(Merged from https://github.com/openssl/openssl/pull/30673)

7 weeks agoECH: conformance test changes for echspec test tool
sftcd [Tue, 17 Mar 2026 21:10:34 +0000 (21:10 +0000)] 
ECH: conformance test changes for echspec test tool

Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 08:59:20 2026
(Merged from https://github.com/openssl/openssl/pull/30419)

7 weeks agoECH: Conformance test changes in response to AISLE review
sftcd [Tue, 17 Mar 2026 21:08:36 +0000 (21:08 +0000)] 
ECH: Conformance test changes in response to AISLE review

Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 08:59:19 2026
(Merged from https://github.com/openssl/openssl/pull/30419)

7 weeks ago80-test_cms.t: Accept success in malformed RSA decryption
Tomas Mraz [Mon, 6 Apr 2026 20:09:20 +0000 (22:09 +0200)] 
80-test_cms.t: Accept success in malformed RSA decryption

The decryption of the malformed encrypted message might succeed
with some probability. We accept that as the testcase tries to
trigger a crash which does not happen.

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Tue Apr  7 07:16:44 2026

7 weeks agorsa_kem: test RSA_public_encrypt() result in RSASVE
Nikola Pajkovsky [Thu, 19 Mar 2026 11:17:45 +0000 (12:17 +0100)] 
rsa_kem: test RSA_public_encrypt() result in RSASVE

RSA_public_encrypt() returns the number of bytes written on success and
-1 on failure.

Add regression coverage in evp_extra_test using custom low-level RSA
methods to exercise the provider/legacy boundary. The new tests verify
that encapsulation fails when RSA_public_encrypt() returns:

  * -1, which is the documented failure result, and
  * a short positive length, which is also invalid for RSASVE with
    RSA_NO_PADDING because the ciphertext must be exactly nlen bytes.

Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Mon Apr  6 19:45:39 2026

7 weeks agorsa_kem: validate RSA_public_encrypt() result in RSASVE
Nikola Pajkovsky [Thu, 19 Mar 2026 11:16:08 +0000 (12:16 +0100)] 
rsa_kem: validate RSA_public_encrypt() result in RSASVE

RSA_public_encrypt() returns the number of bytes written on success and
-1 on failure. With the existing `if (ret)` check, a provider-side RSA KEM
encapsulation can incorrectly succeed when the underlying RSA public
encrypt operation fails. In that case the code reports success, returns
lengths as if encapsulation completed normally, and leaves the freshly
generated secret available instead of discarding it.

Tighten the success condition so RSASVE only succeeds when
RSA_public_encrypt() returns a positive value equal to the modulus-sized
output expected for RSA_NO_PADDING. Any other return value is treated as
failure, and the generated secret is cleansed before returning.

Fixes CVE-2026-31790
Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Mon Apr  6 19:45:38 2026

7 weeks agoAvoid possible buffer overflow in buf2hex conversion
Igor Ustinov [Thu, 5 Mar 2026 14:47:34 +0000 (15:47 +0100)] 
Avoid possible buffer overflow in buf2hex conversion

Fixes CVE-2026-31789

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Mon Apr  6 19:39:23 2026

7 weeks agoAdded test for CVE-2026-28388
Daniel Kubec [Tue, 17 Mar 2026 10:14:56 +0000 (11:14 +0100)] 
Added test for CVE-2026-28388

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Mon Apr  6 19:27:17 2026

7 weeks agoFix NULL Dereference When Delta CRL Lacks CRL Number Extension
Daniel Kubec [Tue, 17 Mar 2026 10:11:22 +0000 (11:11 +0100)] 
Fix NULL Dereference When Delta CRL Lacks CRL Number Extension

Fixes CVE-2026-28388

Co-authored-by: Igor Morgenstern <igor.morgenstern@aisle.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Mon Apr  6 19:27:16 2026

7 weeks agoOut-of-bounds read in AES-CFB-128 on X86-64 with AVX-512 support
Daniel Kubec [Wed, 18 Mar 2026 10:27:52 +0000 (11:27 +0100)] 
Out-of-bounds read in AES-CFB-128 on X86-64 with AVX-512 support

The partial-block pre-processing code in ossl_aes_cfb128_vaes_enc and
ossl_aes_cfb128_vaes_dec unconditionally loads 16 bytes from the input buffer
using unmasked vmovdqu8 instructions, even when fewer bytes are valid.
This can read 1–15 bytes beyond the provided buffer. The post-processing code
in the same file correctly uses masked loads to avoid this issue.

Fixes CVE-2026-28386

Co-Authored-by: Stanislav Fort <stanislav.fort@aisle.com>
Co-Authored-by: Pavel Kohout <pavel.kohout@aisle.com>
Co-Authored-by: Alex Gaynor <gaynor@anthropic.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Mon Apr  6 19:16:26 2026

7 weeks agoAdd test for CMS decryption with RSA keys
Neil Horman [Sun, 29 Mar 2026 14:47:03 +0000 (10:47 -0400)] 
Add test for CMS decryption with RSA keys

Ensure we don't encounter a segfault when decrypting CMS messages with
malformed EnvelopedData when using RSA-OAEP.

Co-authored-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
MergeDate: Mon Apr  6 18:58:32 2026

7 weeks agoFix NULL deref in rsa_cms_decrypt
Neil Horman [Wed, 1 Apr 2026 08:56:44 +0000 (10:56 +0200)] 
Fix NULL deref in rsa_cms_decrypt

Very simmilar to CVE-2026-28389, ensure that if we are missing
parameters in RSA-OAEP SourceFunc in CMS KeyTransportRecipientInfo,
we don't segfault when decrypting.

Co-authored-by: Tomas Mraz <tomas@openssl.foundation>
Fixes CVE-2026-28390

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
MergeDate: Mon Apr  6 18:58:30 2026

7 weeks agoTest for DH/ECDH CMS KARI processing NULL pointer dereference
Neil Horman [Tue, 31 Mar 2026 18:38:03 +0000 (14:38 -0400)] 
Test for DH/ECDH CMS KARI processing NULL pointer dereference

Test to ensure that, if we attempt to decrypt a CMS message with a
missing parameter field of KeyEncryptionAlgorithmIdentifier
we fail, rather than segfault.

Co-authored-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
MergeDate: Mon Apr  6 18:58:29 2026

7 weeks agoFix NULL deref in [ec]dh_cms_set_shared_info
Neil Horman [Mon, 16 Mar 2026 17:49:07 +0000 (13:49 -0400)] 
Fix NULL deref in [ec]dh_cms_set_shared_info

Multiple independent reports indicated a SIGSEGV was possible in CMS
processing when a crafted CMS EnvelopedData message using A Key
Agreement Recipient Info field.  If the
KeyEncryptionAlgorithmIdentifier omits the optional parameter field, the
referenced functions above will attempt to dereference the
alg->parameter data prior to checking if the parameter field is NULL.

Confirmed to resolve the issues using the reproducers provided in the
security reports.

Co-authored-by: Tomas Mraz <tomas@openssl.foundation>
Fixes CVE-2026-28389

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
MergeDate: Mon Apr  6 18:58:28 2026

8 weeks ago.github/workflows/windows.yml: Fix typo breaking the Windows CI
Tomas Mraz [Fri, 3 Apr 2026 16:04:21 +0000 (18:04 +0200)] 
.github/workflows/windows.yml: Fix typo breaking the Windows CI

Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Sat Apr  4 06:28:16 2026
(Merged from https://github.com/openssl/openssl/pull/30674)

8 weeks agodoc: document PKCS12 password prompting for certificates
kovan [Mon, 2 Feb 2026 14:47:35 +0000 (15:47 +0100)] 
doc: document PKCS12 password prompting for certificates

Document that commands reading certificates from PKCS#12 files may
prompt for a password. The existing documentation only mentioned
password prompting for private keys.

Fixes #21292

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Apr  3 15:52:28 2026
(Merged from https://github.com/openssl/openssl/pull/29918)

8 weeks agoevp_test.c: Check error stack for new errors and not stale ones
Tomas Mraz [Thu, 2 Apr 2026 09:08:56 +0000 (11:08 +0200)] 
evp_test.c: Check error stack for new errors and not stale ones

The error stack might have stale entries but
we are interested only in those coming from the
EVP call being tested.

Fixes #30454

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Fri Apr  3 15:49:52 2026
(Merged from https://github.com/openssl/openssl/pull/30669)

8 weeks agoFix a CHANGES.md entry added to the wrong section
Matt Caswell [Thu, 2 Apr 2026 08:01:00 +0000 (09:01 +0100)] 
Fix a CHANGES.md entry added to the wrong section

This fixes the CHANGES.md entry added via #30225 which erroneously added
the entry in the "Changes between 3.6 and 4.0" section instead of the
"Changes between 4.0 and 4.1" section

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Apr  3 15:48:20 2026
(Merged from https://github.com/openssl/openssl/pull/30668)

8 weeks agoquic: fix NULL deref in ossl_quic_new_from_listener()
Abhinav Agarwal [Thu, 2 Apr 2026 05:58:30 +0000 (22:58 -0700)] 
quic: fix NULL deref in ossl_quic_new_from_listener()

ossl_quic_port_create_outgoing() can return NULL under memory pressure.
The result was used immediately by ossl_quic_channel_set_msg_callback()
without a NULL check, causing a crash on the SSL_new_from_listener()
API path.

The correct pattern already exists in create_channel() (same file): check
the return value and raise a non-normal error before jumping to cleanup.
Apply the same pattern here.

Fixes: 0b15147a37c ("Implement SSL_new_from_listener()")
Signed-off-by: Abhinav Agarwal <abhinavagarwal1996@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Apr  3 15:46:54 2026
(Merged from https://github.com/openssl/openssl/pull/30667)

8 weeks agoci: Fix CYGWIN build
Milan Broz [Wed, 1 Apr 2026 12:24:44 +0000 (14:24 +0200)] 
ci: Fix CYGWIN build

The build should run with -j4 option, but this option
was never propagated to run command (lost in Powershell).

Just set bash as shell here. This speedups CYGWIN CI build
significantly.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Dmitry Misharov <dmitry@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Apr  3 15:45:11 2026
(Merged from https://github.com/openssl/openssl/pull/30661)

8 weeks agoutil/platform_symbols/windows-symbols.txt: add __stdio_common_vsnprintf_s
Eugene Syromiatnikov [Tue, 31 Mar 2026 10:47:20 +0000 (12:47 +0200)] 
util/platform_symbols/windows-symbols.txt: add __stdio_common_vsnprintf_s

Apparently, it has not been caught after a29d157fdb6d "Replace homebrewed
implementation of *printf*() functions with libc" due to non-working symbol
checks.

Fixes: a29d157fdb6d "Replace homebrewed implementation of *printf*() functions with libc"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Apr  3 15:42:24 2026
(Merged from https://github.com/openssl/openssl/pull/30635)