]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
9 days agoadd a compare thunk function to the STACK of macros
Neil Horman [Wed, 14 Jan 2026 15:10:21 +0000 (10:10 -0500)] 
add a compare thunk function to the STACK of macros

Now that ossl_bsearch is capable of using a thunking function, lets
create a thunking function to use for the STACK_OF macros.

The problem we're addressing is one that gives rise to ubsan issues.
clang-16 forward have a ubsan test that confirms that the target symbol
that we call through a pointer matches the type of the pointer itself.
for instance

int foo(void *a, void *b)
{
   ...
}

int (*fooptr)(char *ac, int *bc) = foo;

fooptr(&charval, &intval);

is strictly speaking in C undefined behavior (even though in normal
operation this works as expected).  Newer compilers are strict about
this however, as several security frameworks operate with an expectation
that this constraint is met.
See https://github.com/openssl/openssl/issues/22896#issuecomment-1837266357
for details.

So we need to create a thunking function.  The sole purpose of this
thunking function is to accept the "real" comparison function for the
STACK_OF macros, along with the two items to compare of the type that
they are passed as from the calling function, and do the convervsion of
both the comparison function and the data pointers to the types that the
real comparison function expects

So we:
1) Modify the DEFINE_STACK_OF macros to create this thunking function
2) Add an OPENSSL_sk_set_cmp_thunks api to set the comparison function
3) modify the requisite places in the stack code to use the thunking
   function when available

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Sat Feb  7 18:11:14 2026
(Merged from https://github.com/openssl/openssl/pull/29640)

9 days agoadd cmp_thunk function to ossl_bsearch
Neil Horman [Tue, 13 Jan 2026 21:25:21 +0000 (16:25 -0500)] 
add cmp_thunk function to ossl_bsearch

Add the initial groundwork to allow for the use of a thunking function
with bsearch.  Normally our comparison function signature doesn't match
the type of the pointer we call it through, leading to ubsan errors,
this lets those signatures match and gives us a place to do the proper
casting

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Sat Feb  7 18:11:11 2026
(Merged from https://github.com/openssl/openssl/pull/29640)

9 days agoadds tests for CVEs 2025/2026
Ganna Starovoytova [Mon, 2 Feb 2026 16:14:53 +0000 (17:14 +0100)] 
adds tests for CVEs 2025/2026

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Sat Feb  7 13:05:48 2026
(Merged from https://github.com/openssl/openssl/pull/29932)

10 days agomake test/quic_multistream_test.c clang-format friendly
Alexandr Nedvedicky [Wed, 4 Feb 2026 15:54:59 +0000 (16:54 +0100)] 
make test/quic_multistream_test.c clang-format friendly

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Fri Feb  6 18:05:50 2026
(Merged from https://github.com/openssl/openssl/pull/29945)

10 days agodoc: Fix typos and grammar in BIO_s_accept documentation
kovan [Thu, 5 Feb 2026 15:41:02 +0000 (16:41 +0100)] 
doc: Fix typos and grammar in BIO_s_accept documentation

- Fix "and attempt" to "an attempt"
- Fix "BIO_BIN_NORMAL" typo to "BIO_BIND_NORMAL"
- Add missing B<> formatting around BIO_BIND_NORMAL and BIO_RR_ACCEPT
- Fix "at then end" to "at the end"
- Fix incomplete sentence about BIO_should_io_special()
- Update copyright year

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
MergeDate: Fri Feb  6 13:34:18 2026
(Merged from https://github.com/openssl/openssl/pull/29910)

10 days agoreplace curl in our interop testing
Neil Horman [Mon, 2 Feb 2026 15:33:22 +0000 (10:33 -0500)] 
replace curl in our interop testing

Since curl dropped support for using the OpenSSL quic stack, we have no
use for it anymore in our interop testing.  Replace it with our own
http3 demonstration client.

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Fri Feb  6 12:46:26 2026
(Merged from https://github.com/openssl/openssl/pull/29922)

10 days agoUpdate ossl-http3-demo to support multiple requests
Neil Horman [Mon, 2 Feb 2026 15:24:56 +0000 (10:24 -0500)] 
Update ossl-http3-demo to support multiple requests

In order to use our http3 demo to do interop testing, said demo needs to
be able to handle multiple requests and responses written to specific
output files.

Add that code here, allowing us to specify optionally a list of requests
on the command line to send to the server, as well as a download
directory, so that requests made get written locally to the same name as
the request in the specified download directory.

while we're at it, also clean up the code infrastructure to use SSL_poll
to do read-ready checking, rather than iterating/mutating the internal
hash table, which is questionable to do (i.e. we shouldn't be removing
elements from the hash table while iterating over it).

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Fri Feb  6 12:46:24 2026
(Merged from https://github.com/openssl/openssl/pull/29922)

10 days agoAES-WRAP: Add tests
slontis [Wed, 4 Feb 2026 22:41:29 +0000 (09:41 +1100)] 
AES-WRAP: Add tests

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29940)

10 days agoAES-WRAP fixes.
slontis [Wed, 4 Feb 2026 22:35:43 +0000 (09:35 +1100)] 
AES-WRAP fixes.

Partially fixes issue in Discussion 22861

AES-WRAP pad is documented as only working for non streaming cases.
It did not however enforce this, so a user could potentially
wrap something incorrectly without an error and then not be able to
unwrap it without an error. The code now checks that update is only
called once.

An internal function returned an int which could be negative for bad
input values, and the return value was assigned to a size_t which
ignored the error condition.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29940)

10 days agoBIO_f_cipher(): Increase internal buffer size used by CipherUpdate()
slontis [Wed, 4 Feb 2026 22:28:34 +0000 (09:28 +1100)] 
BIO_f_cipher(): Increase internal buffer size used by CipherUpdate()

Previously running the commandline "openssl enc -id-aes256-wrap-pad ...'
with a large PQ private key failed since AES-WRAP is not streamable,
and multiple calls to CipherUpdate() are not allowed. Increasing the
size causes CipherUpdate() to only be called once.
The size of the buffer has been changed from 4K to 8K.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29940)

10 days agodoc: changed data_size value for OSSL_PARAM_octet_string() in EVP_SIGNATURE-SLH-DSA.pod
Ethan [Tue, 3 Feb 2026 14:10:45 +0000 (09:10 -0500)] 
doc: changed data_size value for OSSL_PARAM_octet_string() in EVP_SIGNATURE-SLH-DSA.pod

CLA: trivial

Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29933)

10 days agoMake OPENSSL_cleanup() G A
Bob Beck [Thu, 22 Jan 2026 19:22:34 +0000 (12:22 -0700)] 
Make OPENSSL_cleanup() G A

(Your choice of G and A words)

This installs a global destructor if we have destructor support.

The global destructor does nothing and immediately returns under
normal operation. If a global flag indicating that global cleanup
is wanted, it does what OPENSSL_cleanup() used to do.

OPENSSL_cleanup() is then modified to set the global flag indicating
that global cleanup is wanted. At this point if we have destructor
support, it immeditely returns. If we do not have destructor support,
it manually calls the destructor function (meaning without destructor
support it does exactly what it used to do).

This ensures that if we have destructor support, the actions of an
OPENSSL_cleanup() requested by an application will only happen
after any subordinate library destructors which could call into
OpenSSL functions have already run.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Thu Feb  5 19:19:17 2026
(Merged from https://github.com/openssl/openssl/pull/29721)

11 days agoDon't setup a default context while tearing down private contexts
Neil Horman [Wed, 28 Jan 2026 20:25:20 +0000 (15:25 -0500)] 
Don't setup a default context while tearing down private contexts

In providers/applications that create custom libctx'es via
OSSL_LIB_CTX_new, its possible, if the default provider has never been
initaialized during the lifetime of the linked libcrypto, that we
actually wind up creating the default libctx when we free the
aforementioned custom libctx via, as an example:

legacy_teardown->
 OSSL_LIB_CTX_free->
  ossl_lib_ctx_is_default->
   get_default_context->
    get_thread_default_context->
     default_context_do_init

While this isn't catastrophic, its needless, and in some cases has the
potential to leak memory (for instance if a provider is loaded and
unloaded repeatedly in an environment in which the provider is linked to
libcrypto.so while the calling application is statically linked to
libcrypto.a

Its also fairly easy to clean up, by adding an internal parameter to
gate the creation of the default libctx on the request of the caller, so
do that here

Fixes openssl/project#1846

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Thu Feb  5 17:08:13 2026
(Merged from https://github.com/openssl/openssl/pull/29830)

11 days agoFix const spec in test
Milan Broz [Tue, 20 Jan 2026 15:49:06 +0000 (16:49 +0100)] 
Fix const spec in test

This patch fixes several const specifiers and unneeded casts
(visible with non-default const-qual warning).

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Thu Feb  5 09:13:46 2026
(Merged from https://github.com/openssl/openssl/pull/29800)

11 days agoAdded CHANGES.MD entry
Viktor Dukhovni [Sat, 20 Dec 2025 05:04:15 +0000 (16:04 +1100)] 
Added CHANGES.MD entry

Also added a couple of missing markdown quotes around strings with
internal liternal underscores.  More remain...

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Thu Feb  5 09:09:46 2026
(Merged from https://github.com/openssl/openssl/pull/24551)

11 days agoAdvertise FFDHE groups also with TLS 1.2-only
Viktor Dukhovni [Tue, 16 Dec 2025 16:48:06 +0000 (03:48 +1100)] 
Advertise FFDHE groups also with TLS 1.2-only

When the TLS max version is TLS 1.2, include supported RFC7919 FFDHE
groups in the supported_groups extension, provided we support at least
one DHE key exchange ciphersuite.

Also skip the EC point formats extension when the minimum (D)TLS version
is greater than 1.2.  That extension is obsolete as of (D)TLS 1.3.

Finally, folded some extant long lines from the previous RFC7919 commits.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Thu Feb  5 09:09:43 2026
(Merged from https://github.com/openssl/openssl/pull/24551)

11 days agoImplement second step of RFC7919 in TLS 1.2 server
Joachim Vandersmissen [Mon, 15 Dec 2025 07:29:21 +0000 (18:29 +1100)] 
Implement second step of RFC7919 in TLS 1.2 server

Before this commit, the logic for generating a temporary DH key for DHE
cipher suites is the following:
1) If dh_tmp_auto is set (see SSL_set_dh_auto), the SSL server
   automatically selects a set of DH parameters (P and G) appropriate
   for the security level of the cipher suite. The groups are taken from
   IKE (RFC 2409 and RFC 3526).
2) Otherwise, if the user provided a pre-generated set of DH parameters
   (SSL_set0_tmp_dh_pkey), those parameters are used.
3) Finally, if neither 1) or 2) are applicable, a callback function can
   be set using SSL_set_tmp_dh_callback, which will be invoked to
   generate the temporary DH parameters. From OpenSSL 3.0, this
   functionality is deprecated.
4) Using the parameters from step 1-3, an ephemeral DH key is
   generated. The parameters and the public key are sent to the client.

The logic above is updated by inserting an additional step, prior to
step 1:
0) If tls1_shared_group returns any shared known group between the
   server and the client, the DH parameters associated with this group
   are selected.

This is still compliant with RFC7919, as the server will already have
checked the Supported Groups extension during the ciphersuite selection
process (implemented in the previous commit).

Now, the tests need to be updated: By default, the TLS 1.2 server will
default to RFC7919 groups. To bypass this behavior, the supported groups
on the client side is set to "xorgroup", ensuring that the client does
not advertise any FFDHE group support and the server falls back to the
old logic.

An additional test is also added to ensure that the TLS 1.2 server does
select the right group if the client advertises any of the RFC7919
groups.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Thu Feb  5 09:09:41 2026
(Merged from https://github.com/openssl/openssl/pull/24551)

11 days agoImplement first step of RFC7919 in TLS 1.2 server
Joachim Vandersmissen [Mon, 15 Dec 2025 07:09:49 +0000 (18:09 +1100)] 
Implement first step of RFC7919 in TLS 1.2 server

RFC 7919 states:
    If a compatible TLS server receives a Supported Groups extension from
    a client that includes any FFDHE group (i.e., any codepoint between
    256 and 511, inclusive, even if unknown to the server), and if none
    of the client-proposed FFDHE groups are known and acceptable to the
    server, then the server MUST NOT select an FFDHE cipher suite.

We implement this behavior by adding a new function that checks this
condition as its inverse: only select FFDHE cipher suites if at least
one of the client-proposed FFDHE groups is known and acceptable, or
if the client did _not_ send any FFDHE groups.

Also add a test to verify two possible outcomes:
1) The client proposes FFDHE and non-FFDHE ciphersuites -> the server
will select a non-FFDHE ciphersuite.
2) The client only proposes FFDHE ciphersuites -> the server will end
the connection.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Thu Feb  5 09:09:40 2026
(Merged from https://github.com/openssl/openssl/pull/24551)

11 days agoSupport FFDHE groups in tls1_shared_group
Joachim Vandersmissen [Mon, 15 Dec 2025 06:46:12 +0000 (17:46 +1100)] 
Support FFDHE groups in tls1_shared_group

Update tls1_shared_group to allow filtering for FFDHE and/or ECDHE
groups. This will be used for implementing RFC 7919 groups support in
the TLS 1.2 server. As defined in RFC 7919:
   Codepoints in the "Supported Groups Registry" with a high byte of
   0x01 (that is, between 256 and 511, inclusive) are set aside for
   FFDHE groups

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Thu Feb  5 09:09:38 2026
(Merged from https://github.com/openssl/openssl/pull/24551)

11 days agoExplicitly define `SIO_UDP_NETRESET` for MinGW builds.
Alexander Hansen Færøy [Wed, 28 Jan 2026 16:55:02 +0000 (17:55 +0100)] 
Explicitly define `SIO_UDP_NETRESET` for MinGW builds.

This patch explicitly defines the value `SIO_UDP_NETRESET` according to
both what Windows and ReactOS does.

Fixes: #29818.
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Thu Feb  5 08:54:17 2026
(Merged from https://github.com/openssl/openssl/pull/29826)

11 days agoFix const spec in apps
Milan Broz [Tue, 20 Jan 2026 13:18:14 +0000 (14:18 +0100)] 
Fix const spec in apps

This patch fixes several const specifiers
(visible with non-default const-qual warning).

 - Functions like SSL_set_tlsext_host_name takes
   non-cost hostname parameter.

 - packet buffer is read in BIO_read, so it
   cannot be const

The rest is missing const specifiers where casting
to non-cost is not needed.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Wed Feb  4 19:49:15 2026
(Merged from https://github.com/openssl/openssl/pull/29796)

11 days agoGate use of IPV6_PMTUDISC_PROBE on it being defined
Neil Horman [Mon, 2 Feb 2026 23:46:49 +0000 (18:46 -0500)] 
Gate use of IPV6_PMTUDISC_PROBE on it being defined

We accidentally introduced a use of IPV6_PMTUDISC_PROBE without checking
if it was defined in
https://github.com/openssl/openssl/pull/28809

leading to build failures on systems that don't define it.  Fix that.

Fixes #29903

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Wed Feb  4 19:23:14 2026
(Merged from https://github.com/openssl/openssl/pull/29927)

12 days agoGuard RWLOCK methods by USE_RWLOCK in threads_pthread.c
Randall S. Becker [Mon, 2 Feb 2026 17:31:13 +0000 (17:31 +0000)] 
Guard RWLOCK methods by USE_RWLOCK in threads_pthread.c

Fixes: #29883
Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Wed Feb  4 15:55:47 2026
(Merged from https://github.com/openssl/openssl/pull/29924)

12 days agocrypto/{CMS,PKCS7,OCSP,TS,X509}: constify various cert list parameters
Dr. David von Oheimb [Sat, 7 Oct 2023 16:14:05 +0000 (18:14 +0200)] 
crypto/{CMS,PKCS7,OCSP,TS,X509}: constify various cert list parameters

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/22304)

12 days agoX509_ALGOR_set_md(): Add return value to indicate success or failure
Dr. David von Oheimb [Thu, 13 Jan 2022 16:19:24 +0000 (17:19 +0100)] 
X509_ALGOR_set_md(): Add return value to indicate success or failure

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17495)

13 days agoFix const spec in ssl
Milan Broz [Tue, 20 Jan 2026 15:35:25 +0000 (16:35 +0100)] 
Fix const spec in ssl

This patch fixes several const specifiers and undeeded
casts (visible with non-default const-qual warning).

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Tue Feb  3 17:26:31 2026
(Merged from https://github.com/openssl/openssl/pull/29799)

13 days agoFix broken build for non-gnu make
Alexandr Nedvedicky [Thu, 29 Jan 2026 17:15:45 +0000 (18:15 +0100)] 
Fix broken build for non-gnu make

Ml-dsa provider module requires der_digests.h which is generated
from der_digets.h.in. The dependency must be explicitly set in
build.info otherwise the .h file is missing when
providers/common/der/der_ml_dsa_key.c gets compiled.

The issue seems to affect only make found in base system on OpenBSD.
gnu-make (a.k.a gmake) is not affected.

It got introduced by #175cda569df

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
MergeDate: Tue Feb  3 17:13:36 2026
(Merged from https://github.com/openssl/openssl/pull/29853)

13 days agopublic API: Remove needless 'const' from scalar types
Dr. David von Oheimb [Tue, 3 May 2022 10:42:58 +0000 (12:42 +0200)] 
public API: Remove needless 'const' from scalar types

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18229)

13 days agoFix const spec in providers
Milan Broz [Tue, 20 Jan 2026 14:40:18 +0000 (15:40 +0100)] 
Fix const spec in providers

This patch fixes several const specifiers
(visible with non-default const-qual warning).

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Tue Feb  3 14:12:00 2026
(Merged from https://github.com/openssl/openssl/pull/29798)

13 days agodoc: add return value documentation for EVP_CIPHER_*_params functions
kovan [Tue, 27 Jan 2026 06:44:55 +0000 (07:44 +0100)] 
doc: add return value documentation for EVP_CIPHER_*_params functions

Document that EVP_CIPHER_get_params(), EVP_CIPHER_CTX_get_params() and
EVP_CIPHER_CTX_set_params() return 1 for success and 0 for failure.

Fixes #29725

CLA: trivial

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: Tue Feb  3 09:51:47 2026
(Merged from https://github.com/openssl/openssl/pull/29779)

13 days agodoc: clarify OSSL_DISPATCH array usage in provider-base
kovan [Tue, 27 Jan 2026 05:01:49 +0000 (06:01 +0100)] 
doc: clarify OSSL_DISPATCH array usage in provider-base

The previous wording "arrays are indexed by numbers" was misleading
as it suggested direct array indexing. Clarify that OSSL_DISPATCH
entries contain a function_id field that identifies the function.

Fixes #27125

CLA: trivial

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: Tue Feb  3 09:48:02 2026
(Merged from https://github.com/openssl/openssl/pull/29769)

13 days agoSSL_CONF_FLAG: Prevent setting both CMDLINE and FILE flags
Tommy Chiang [Sun, 25 Jan 2026 13:12:28 +0000 (21:12 +0800)] 
SSL_CONF_FLAG: Prevent setting both CMDLINE and FILE flags

The `SSL_CONF_CTX_set_flags` function did not prevent setting both
`SSL_CONF_FLAG_CMDLINE` and `SSL_CONF_FLAG_FILE` flags, which is an
invalid combination. This commit adds a check to prevent this and
updates the documentation to clarify that only one of these flags
can be set.

A new test case is also added to verify the correct behavior.

Fixes https://github.com/openssl/openssl/issues/15508

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Tue Feb  3 09:40:04 2026
(Merged from https://github.com/openssl/openssl/pull/29752)

13 days agoUpdate CONTRIBUTING.md for clang-format style
Milan Broz [Mon, 26 Jan 2026 08:27:40 +0000 (09:27 +0100)] 
Update CONTRIBUTING.md for clang-format style

The old Perl tool no longer exists, mention clang-format
and utilities.

Fixes: https://github.com/openssl/project/issues/1770
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Tue Feb  3 09:07:35 2026
(Merged from https://github.com/openssl/openssl/pull/29755)

13 days agoASN.1: Raise additional errors in crl_set_issuers()
Daniel Kubec [Sat, 24 Jan 2026 19:50:42 +0000 (20:50 +0100)] 
ASN.1: Raise additional errors in crl_set_issuers()

Additional ASN.1 parsing errors are now raised to the error stack,
allowing invalid CRLs to be rejected early with detailed error messages.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Tue Feb  3 09:02:15 2026
(Merged from https://github.com/openssl/openssl/pull/29750)

13 days agoFix typo in CHANGES and NEWS entry for CVE-2019-1551
Tomas Mraz [Fri, 23 Jan 2026 15:29:59 +0000 (16:29 +0100)] 
Fix typo in CHANGES and NEWS entry for CVE-2019-1551

Fixes #12977

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Tue Feb  3 08:56:59 2026
(Merged from https://github.com/openssl/openssl/pull/29740)

13 days agocheck_cert_crl(): Avoid potential UAF when using the value of current_crl
Tomas Mraz [Thu, 22 Jan 2026 10:23:26 +0000 (11:23 +0100)] 
check_cert_crl(): Avoid potential UAF when using the value of current_crl

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
MergeDate: Tue Feb  3 08:50:53 2026
(Merged from https://github.com/openssl/openssl/pull/29679)

13 days agoEnsure current_crl always points to the crl we are considering
Bob Beck [Wed, 21 Jan 2026 18:47:37 +0000 (11:47 -0700)] 
Ensure current_crl always points to the crl we are considering

As mentioned by Viktor Dukhovni, the desired behaviour is:

The current_crl is NULL when the running callback invocation is about errors
unrelated to validation failures via a particular CRL a user may want to
report the issuer of.

The current_crl is (whenever possible) not NULL when reporting errors
specifically related to that CRL.

The problem with this happens when we call check_crl with something that
is not what current_crl is set to. We can potentially enter the time check
code, and we then need to call the callback with the certificate that
failed the time check which is not current_crl.

Correct this by removing the dance in the time check code, and always
setting current_crl whenver we call check_crl.

This means that when we are considering a delta crl, we report the
correct crl to the callback, instead of possibly handing them NULL
(if they get called after a failing time check clobbers it), or the
non-delta crl (because we are looking at a delta while having
current_crl set to crl - which was why we had the dance in the time code
to begin with.  We don't need to change current_crl in the time check
code if we always have current_crl set to the thing we are evaluting.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Tue Feb  3 08:50:52 2026
(Merged from https://github.com/openssl/openssl/pull/29679)

13 days agoBIO_get_data.pod: Warn about use outside of a custom BIO implementation
noctuelles [Mon, 19 Jan 2026 17:19:08 +0000 (18:19 +0100)] 
BIO_get_data.pod: Warn about use outside of a custom BIO implementation

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Tue Feb  3 08:47:06 2026
(Merged from https://github.com/openssl/openssl/pull/29675)

13 days agoapps/cmp.c: fix help output and diagnostics in corner cases such as -reqout_only
Dr. David von Oheimb [Wed, 26 Feb 2025 17:45:29 +0000 (18:45 +0100)] 
apps/cmp.c: fix help output and diagnostics in corner cases such as -reqout_only

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Tue Feb  3 08:43:06 2026
(Merged from https://github.com/openssl/openssl/pull/28478)

13 days ago80-test_cmp_http.t: improve diagnostics on failure getting server output
Dr. David von Oheimb [Mon, 8 Sep 2025 12:18:04 +0000 (14:18 +0200)] 
80-test_cmp_http.t: improve diagnostics on failure getting server output

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Tue Feb  3 08:43:04 2026
(Merged from https://github.com/openssl/openssl/pull/28478)

13 days agoopenssl-cmp.pod.in: fix doc of -server uri argument and tweak doc of -tls_used
Dr. David von Oheimb [Mon, 14 Apr 2025 19:04:07 +0000 (21:04 +0200)] 
openssl-cmp.pod.in: fix doc of -server uri argument and tweak doc of -tls_used

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Tue Feb  3 08:43:03 2026
(Merged from https://github.com/openssl/openssl/pull/28478)

13 days agoapps/cmp.c: avoid misleading warning with p10cr; add warnings on options ignored...
Dr. David von Oheimb [Fri, 30 May 2025 09:13:29 +0000 (11:13 +0200)] 
apps/cmp.c: avoid misleading warning with p10cr; add warnings on options ignored when not doing rr

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Tue Feb  3 08:43:02 2026
(Merged from https://github.com/openssl/openssl/pull/28478)

13 days agoapps/cmp.c: avoid misleading error on genm with -reqout_only
Dr. David von Oheimb [Fri, 30 May 2025 09:10:13 +0000 (11:10 +0200)] 
apps/cmp.c: avoid misleading error on genm with -reqout_only

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Tue Feb  3 08:43:00 2026
(Merged from https://github.com/openssl/openssl/pull/28478)

13 days agoapps/cmp.c: make error/warning/info/debug log output text lines consistently start...
Dr. David von Oheimb [Fri, 30 May 2025 07:36:03 +0000 (09:36 +0200)] 
apps/cmp.c: make error/warning/info/debug log output text lines consistently start upper-case

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Tue Feb  3 08:42:59 2026
(Merged from https://github.com/openssl/openssl/pull/28478)

13 days agoapps/cmp.c: tweak error and warning outputs, e.g., on ignored options and -rspin...
Dr. David von Oheimb [Mon, 14 Apr 2025 18:38:09 +0000 (20:38 +0200)] 
apps/cmp.c: tweak error and warning outputs, e.g., on ignored options and -rspin with too few args

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Tue Feb  3 08:42:57 2026
(Merged from https://github.com/openssl/openssl/pull/28478)

13 days agoaes-gcm-ppc.pl: Removed .localentry directive
Danny Tsen [Wed, 28 Jan 2026 12:23:13 +0000 (07:23 -0500)] 
aes-gcm-ppc.pl: Removed .localentry directive

Otherwise there is mixing of  ELFv1 ABI and ELFv2 ABI directives
and PPC64 big endian builds fail.

Fixes #29815

Signed-off-by: Danny Tsen <dtsen@us.ibm.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Tue Feb  3 08:39:50 2026
(Merged from https://github.com/openssl/openssl/pull/29827)

2 weeks agoAdd enable-tls-deprecated-ec option to keep provider compatibility
Alexandr Nedvedicky [Fri, 30 Jan 2026 10:07:30 +0000 (11:07 +0100)] 
Add enable-tls-deprecated-ec option to keep provider compatibility
test happy.

Fixes openssl/project#1849

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MergeDate: Mon Feb  2 16:50:45 2026
(Merged from https://github.com/openssl/openssl/pull/29866)

2 weeks agoASN1_item_sign_ctx(): prevent crash due to wrong memory deallocation on d2i_X509_ALGO...
Dr. David von Oheimb [Sun, 1 Jun 2025 06:35:28 +0000 (08:35 +0200)] 
ASN1_item_sign_ctx(): prevent crash due to wrong memory deallocation on d2i_X509_ALGOR() failure

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27737)

2 weeks agoUse fixed version of curl in quic-interop-container
Neil Horman [Thu, 29 Jan 2026 17:19:54 +0000 (12:19 -0500)] 
Use fixed version of curl in quic-interop-container

As part of 6aaac9dd388a64d0f511544496608693e1105d13 in
https://github.com/curl/curl.git

Curl dropped support for using the quic-tls interface to use our quic
stack.  Because our interop testing relies on using curl to do testing,
our builds broke.

Until we can find an alternate client to do https transfers over
http3/quic, we need to back off our quic build point to a commit prior
to the above so we can maintain our interop testing.

Long term, we need to enhance our own http3 demo client to support the
download/resumption/etc features that we need for interop.  We're
tracking that effort in:
https://github.com/openssl/project/issues/1850

Fixes openssl/project#1848

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MergeDate: Fri Jan 30 12:20:11 2026
(Merged from https://github.com/openssl/openssl/pull/29857)

2 weeks agoUpdate test/README.md
Neil Horman [Thu, 22 Jan 2026 18:48:30 +0000 (13:48 -0500)] 
Update test/README.md

Co-authored-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Thu Jan 29 16:37:40 2026
(Merged from https://github.com/openssl/openssl/pull/29573)

2 weeks agoadd valgrind supression file
Neil Horman [Fri, 16 Jan 2026 21:11:10 +0000 (16:11 -0500)] 
add valgrind supression file

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Thu Jan 29 16:37:37 2026
(Merged from https://github.com/openssl/openssl/pull/29573)

2 weeks agozero buffers in sslapitest
Neil Horman [Fri, 16 Jan 2026 20:33:11 +0000 (15:33 -0500)] 
zero buffers in sslapitest

valgrind gripes about this, as its possible to reach the TEST_mem_eq
test without ever having initalized the buffer

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Thu Jan 29 16:37:35 2026
(Merged from https://github.com/openssl/openssl/pull/29573)

2 weeks agoinitalize control block on dgram_sendmmsg
Neil Horman [Thu, 15 Jan 2026 20:06:14 +0000 (15:06 -0500)] 
initalize control block on dgram_sendmmsg

Passing uninitalized data to a syscall result in valgrind warnings, and
probably shouldn't be done anyway.  Fix that

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Thu Jan 29 16:37:32 2026
(Merged from https://github.com/openssl/openssl/pull/29573)

2 weeks agoExclude some tests from valgrind
Neil Horman [Thu, 15 Jan 2026 18:27:34 +0000 (13:27 -0500)] 
Exclude some tests from valgrind

Some tests (liek the mem_alloc and abort tests do things with malloc
intentionally as sanity checks that valgrind complains about, and so we
just shouldn't run those tests under valgrind at all

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Thu Jan 29 16:37:30 2026
(Merged from https://github.com/openssl/openssl/pull/29573)

2 weeks agoUpdate valgrind to use separate logs
Neil Horman [Fri, 9 Jan 2026 16:58:51 +0000 (11:58 -0500)] 
Update valgrind to use separate logs

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Thu Jan 29 16:37:28 2026
(Merged from https://github.com/openssl/openssl/pull/29573)

2 weeks agoAdd a method to run our test suite under valgrind
Neil Horman [Wed, 7 Jan 2026 20:48:29 +0000 (15:48 -0500)] 
Add a method to run our test suite under valgrind

As part of our effort to provide a supression file for valgrind that we
can maintain, we should have the ability to run our tests under
valgrind.

Add an environment variable OSSL_USE_VALGRIND to prefix all our app and
test executions with the valgrind tool so that we can run it
automatically

Fixes openssl/project#1801

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Thu Jan 29 16:37:26 2026
(Merged from https://github.com/openssl/openssl/pull/29573)

2 weeks agoFix coding style check by adding clang format exclusions
rainerjung [Wed, 28 Jan 2026 11:00:35 +0000 (12:00 +0100)] 
Fix coding style check by adding clang format exclusions

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Thu Jan 29 14:22:55 2026
(Merged from https://github.com/openssl/openssl/pull/29817)

2 weeks agoSparc asm: remove whitespace that breaks asm syntax in generated files
rainerjung [Wed, 28 Jan 2026 10:15:53 +0000 (11:15 +0100)] 
Sparc asm: remove whitespace that breaks asm syntax in generated files

This fixes #29808.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Thu Jan 29 14:22:50 2026
(Merged from https://github.com/openssl/openssl/pull/29817)

2 weeks agos390x: EC: use OpenSSL's RNG for ECDSA nonce 'k' for FIPS module
Ingo Franzki [Fri, 23 Jan 2026 07:43:54 +0000 (08:43 +0100)] 
s390x: EC: use OpenSSL's RNG for ECDSA nonce 'k' for FIPS module

The KDSA instruction can operate in 2 different modes:
- Deterministic mode - nonce 'k' is supplied by user.
- Non-deterministic mode - nonce 'k' is randomly generated by the instruction
  itself.

When running in the FIPS-Module, do not use KDSA's non-deterministic mode,
but generate the nonce 'k' using OpenSSL's random number generator. This
ensures that the nonce is generated using a FIPS-approved random number
generator.

It also makes the FIPS KAT tests work, because those use a pre-setup
deterministic random number generator to produce deterministic ECDSA
signatures even for non-deterministic mode.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29754)

2 weeks agodoc: Add const to SSL_CTX_set1_groups/curves documentation
kovan [Tue, 27 Jan 2026 05:02:00 +0000 (06:02 +0100)] 
doc: Add const to SSL_CTX_set1_groups/curves documentation

The set1_groups and set1_curves functions do not modify their input
arrays, so the documentation should reflect const-correct signatures.

Fixes #27422

CLA: trivial

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29762)

2 weeks agodoc: Add deprecation note to SSL_get_peer_certificate description
kovan [Tue, 27 Jan 2026 05:01:56 +0000 (06:01 +0100)] 
doc: Add deprecation note to SSL_get_peer_certificate description

Fixes #22972

CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29764)

2 weeks agodoc: Clarify SSL_get_SSL_CTX returns internal pointer
kovan [Tue, 27 Jan 2026 04:58:12 +0000 (05:58 +0100)] 
doc: Clarify SSL_get_SSL_CTX returns internal pointer

Document that the returned pointer is internal, reference count is not
incremented, and should not be freed. Mention SSL_CTX_up_ref() for
callers who need to retain the SSL_CTX.

Fixes #28298

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29767)

2 weeks agodoc: add missing DH_check_pub_key documentation and fix typo
kovan [Tue, 27 Jan 2026 05:01:51 +0000 (06:01 +0100)] 
doc: add missing DH_check_pub_key documentation and fix typo

Add DH_check_pub_key to NAME and SYNOPSIS sections. Fix typo where
DH_check_params() was incorrectly written instead of DH_check_params_ex()
in the description of the _ex functions.

Also remove DH_check_pub_key from util/missingcrypto.txt since it is
now documented.

Fixes #8473

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29768)

2 weeks agodoc: Fix incorrect parameter reference in EVP_MAC
kovan [Tue, 27 Jan 2026 05:01:52 +0000 (06:01 +0100)] 
doc: Fix incorrect parameter reference in EVP_MAC

The "key" parameter documentation referenced a non-existent "algorithm"
parameter. Change to reference the actual "cipher" and "digest" parameters.

Fixes #12580

CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29766)

2 weeks agotest/evp_test.c: avoid resource leak in digest_test_run()
Eugene Syromiatnikov [Mon, 26 Jan 2026 08:54:31 +0000 (09:54 +0100)] 
test/evp_test.c: avoid resource leak in digest_test_run()

The function can return on ctrl2params() returning 0 without freeing
the allocated memory associated with the got pointer.  Fix it by jumping
to the err label that performs the cleanup instead of returning
immediately.

Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1680647
Fixes: 9c738431411e "Add support for CSHAKE."
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Wed Jan 28 12:57:04 2026
(Merged from https://github.com/openssl/openssl/pull/29757)

2 weeks agosrtpkdf.c: avoid ctx NULL dereference kdf_srtpkdf_set_ctx_params()
Eugene Syromiatnikov [Mon, 26 Jan 2026 08:51:33 +0000 (09:51 +0100)] 
srtpkdf.c: avoid ctx NULL dereference kdf_srtpkdf_set_ctx_params()

ctx is dereferenced before NULL check to obtain libctx.  Fix it
by moving the dereference after the NULL check.

Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1680648
Fixes: fe67753da4096 "Add SRTPKDF implementation"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Wed Jan 28 12:57:00 2026
(Merged from https://github.com/openssl/openssl/pull/29757)

2 weeks agocrypto/bio/bf_buff.c: drop extraneous ctx NULL check in buffer_ctrl()
Eugene Syromiatnikov [Mon, 26 Jan 2026 08:48:53 +0000 (09:48 +0100)] 
crypto/bio/bf_buff.c: drop extraneous ctx NULL check in buffer_ctrl()

b->ptr cannot be NULL, so, the check is not needed, drop it.
Reported by Coverity as a potential NULL dereference in ctx->ibuf_len
access.

Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1680636
Fixes: f17230ae6c9f "Fix of EOF and retry handling in BIO implementations"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Wed Jan 28 12:56:56 2026
(Merged from https://github.com/openssl/openssl/pull/29757)

2 weeks agoUpdate doc/man3/OPENSSL_init_crypto.pod
Neil Horman [Mon, 26 Jan 2026 16:41:23 +0000 (11:41 -0500)] 
Update doc/man3/OPENSSL_init_crypto.pod

Co-authored-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Tue Jan 27 20:43:01 2026
(Merged from https://github.com/openssl/openssl/pull/29648)

2 weeks agoFix documentation for OPENSSL_cleanup in pod files
Neil Horman [Thu, 15 Jan 2026 16:36:02 +0000 (11:36 -0500)] 
Fix documentation for OPENSSL_cleanup in pod files

Fixes openssl/project#1826

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Tue Jan 27 20:42:58 2026
(Merged from https://github.com/openssl/openssl/pull/29648)

2 weeks agoFix ubsan errors in OPENSSL_sk_pop_free
Neil Horman [Tue, 20 Jan 2026 19:49:57 +0000 (14:49 -0500)] 
Fix ubsan errors in OPENSSL_sk_pop_free

ubsan reports an error in the free callback function for
OPENSSL_sk_pop_free.

Need to add a thunking shim to cast the pointer data types to their
proper types

Fixes #29616

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Tue Jan 27 17:25:34 2026
(Merged from https://github.com/openssl/openssl/pull/29690)

2 weeks agoPKCS12_item_decrypt_d2i_ex(): Check oct argument for NULL
Andrew Dinh [Wed, 7 Jan 2026 16:24:30 +0000 (01:24 +0900)] 
PKCS12_item_decrypt_d2i_ex(): Check oct argument for NULL

Fixes CVE-2025-69421

Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Mon Jan 26 19:56:08 2026

2 weeks agoVerify ASN1 object's types before attempting to access them
Bob Beck [Wed, 7 Jan 2026 18:29:48 +0000 (11:29 -0700)] 
Verify ASN1 object's types before attempting to access them
as a particular type

Issue was reported in ossl_ess_get_signing_cert but is also present in
ossl_ess_get_signing_cert_v2.

Fixes: https://github.com/openssl/srt/issues/61
Fixes CVE-2025-69420

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Mon Jan 26 19:53:36 2026

2 weeks agoFix OCB AES-NI/HW stream path unauthenticated/unencrypted trailing bytes
Norbert Pocs [Thu, 8 Jan 2026 14:04:54 +0000 (15:04 +0100)] 
Fix OCB AES-NI/HW stream path unauthenticated/unencrypted trailing bytes

When ctx->stream (e.g., AES‑NI or ARMv8 CE) is available, the fast path
encrypts/decrypts full blocks but does not advance in/out pointers. The
tail-handling code then operates on the base pointers, effectively reprocessing
the beginning of the buffer while leaving the actual trailing bytes
unencrypted (encryption) or using the wrong plaintext (decryption). The
authentication checksum excludes the true tail.

CVE-2025-69418

Fixes: https://github.com/openssl/srt/issues/58
Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Mon Jan 26 19:48:35 2026

2 weeks agoCheck the received uncompressed certificate length to prevent excessive
Igor Ustinov [Thu, 8 Jan 2026 13:02:54 +0000 (14:02 +0100)] 
Check the received uncompressed certificate length to prevent excessive
pre-decompression allocation.

The patch was proposed by Tomas Dulka and Stanislav Fort (Aisle Research).

Fixes: CVE-2025-66199
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Mon Jan 26 19:45:21 2026

2 weeks agoFix heap buffer overflow in BIO_f_linebuffer
Neil Horman [Wed, 7 Jan 2026 16:52:09 +0000 (11:52 -0500)] 
Fix heap buffer overflow in BIO_f_linebuffer

When a FIO_f_linebuffer is part of a bio chain, and the next BIO
preforms short writes, the remainder of the unwritten buffer is copied
unconditionally to the internal buffer ctx->obuf, which may not be
sufficiently sized to handle the remaining data, resulting in a buffer
overflow.

Fix it by only copying data when ctx->obuf has space, flushing to the
next BIO to increase available storage if needed.

Fixes openssl/srt#48

Fixes CVE-2025-68160

Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Mon Jan 26 19:41:40 2026

2 weeks agoReport truncation in oneshot `openssl dgst -sign`
Viktor Dukhovni [Tue, 6 Jan 2026 14:21:58 +0000 (01:21 +1100)] 
Report truncation in oneshot `openssl dgst -sign`

Previously input was silently truncated at 16MB, now if the input is
longer than limit, an error is reported.

The bio_to_mem() apps helper function was changed to return 0 or 1,
and return the size of the result via an output size_t pointer.

Fixes  CVE-2025-15469

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Mon Jan 26 19:37:41 2026

2 weeks agoossl_quic_get_cipher_by_char(): Add a NULL guard before dereferencing SSL_CIPHER
Daniel Kubec [Fri, 9 Jan 2026 13:33:24 +0000 (14:33 +0100)] 
ossl_quic_get_cipher_by_char(): Add a NULL guard before dereferencing SSL_CIPHER

Fixes CVE-2025-15468

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Mon Jan 26 19:36:04 2026

2 weeks agoTest for handling of AEAD-encrypted CMS with inadmissibly long IV
Igor Ustinov [Sun, 11 Jan 2026 10:35:15 +0000 (11:35 +0100)] 
Test for handling of AEAD-encrypted CMS with inadmissibly long IV

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Mon Jan 26 19:31:49 2026

2 weeks agoSome comments to clarify functions usage
Igor Ustinov [Mon, 12 Jan 2026 11:15:42 +0000 (12:15 +0100)] 
Some comments to clarify functions usage

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Mon Jan 26 19:31:47 2026

2 weeks agoCorrect handling of AEAD-encrypted CMS with inadmissibly long IV
Igor Ustinov [Mon, 12 Jan 2026 11:13:35 +0000 (12:13 +0100)] 
Correct handling of AEAD-encrypted CMS with inadmissibly long IV

Fixes CVE-2025-15467

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Mon Jan 26 19:31:45 2026

3 weeks agoAdditional PKCS12 PBMAC1 malformed testcase files
Alicja Kario [Thu, 8 Jan 2026 18:31:42 +0000 (19:31 +0100)] 
Additional PKCS12 PBMAC1 malformed testcase files

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Mon Jan 26 16:14:20 2026

3 weeks agoAdd testcase for PKCS12 with invalid PBMAC1 key length
Tomas Mraz [Thu, 8 Jan 2026 14:25:18 +0000 (15:25 +0100)] 
Add testcase for PKCS12 with invalid PBMAC1 key length

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Alicja Kario <hkario@redhat.com>
MergeDate: Mon Jan 26 16:14:18 2026

3 weeks agopkcs12: Validate salt and keylength in PBMAC1
Tomas Mraz [Thu, 8 Jan 2026 13:31:19 +0000 (14:31 +0100)] 
pkcs12: Validate salt and keylength in PBMAC1

The keylength value must be present and we accept
EVP_MAX_MD_SIZE at maximum.

The salt ASN.1 type must be OCTET STRING.

Fixes CVE-2025-11187

Reported by Stanislav Fort (Aisle Research) and Petr Simecek (Aisle Research).
Reported independently also by Hamza (Metadust).

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Alicja Kario <hkario@redhat.com>
MergeDate: Mon Jan 26 16:14:15 2026

3 weeks agoCI: Disable scheduled Fuzzing action in forks
Orgad Shaneh [Sat, 17 Jan 2026 18:50:38 +0000 (20:50 +0200)] 
CI: Disable scheduled Fuzzing action in forks

There is no reason to run it in forks.

Similar to 6e5ce1ebb5bac84043e4327caa467401973dafb8.

Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Mon Jan 26 15:47:57 2026
(Merged from https://github.com/openssl/openssl/pull/29660)

3 weeks agoASN1: Fix type handling in AKID serial number conversion
Daniel Kubec [Thu, 22 Jan 2026 13:54:10 +0000 (14:54 +0100)] 
ASN1: Fix type handling in AKID serial number conversion

The Authority Key Identifier's serial number field is an ASN1 integer, so use
the appropriate i2s_ASN1_INTEGER function instead of i2s_ASN1_OCTET_STRING
for string conversion. This fixes handling of negative serial numbers
which were previously displayed incorrectly.

While negative serial numbers are not RFC-compliant, we want to process
existing CRLs and certificates that may contain them, as this does not cause
any security issues. Rejecting invalid serial numbers during
generation is out of scope for this change.

Fixes #27406

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Mon Jan 26 15:29:33 2026
(Merged from https://github.com/openssl/openssl/pull/29717)

3 weeks agocrypto: x509: fix unreachable code in X509V3_get_section and X509V3_get_string
Anton Moryakov [Thu, 22 Jan 2026 14:51:12 +0000 (17:51 +0300)] 
crypto: x509: fix unreachable code in X509V3_get_section and X509V3_get_string

The functions X509V3_get_section() and X509V3_get_string() contain a
redundant null check after an identical check has already guaranteed
that the function pointer (ctx->db_meth->get_section / get_string) is
non-NULL. As a result, the final 'return NULL;' statement is unreachable.

This change removes the redundant condition and the dead code, improving
code clarity and eliminating warnings from static analyzers.

Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
MergeDate: Mon Jan 26 15:28:01 2026
(Merged from https://github.com/openssl/openssl/pull/29692)

3 weeks agoAdded SSL_CTX_get0_alpn_protos() and SSL_get0_alpn_protos()
Daniel Kubec [Thu, 15 Jan 2026 14:18:31 +0000 (14:18 +0000)] 
Added SSL_CTX_get0_alpn_protos() and SSL_get0_alpn_protos()

Fixes #4952

Co-authored-by: Pauli <ppzgs1@gmail.com>
Co-authored-by: Tomáš Mráz <tm@t8m.info>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Mon Jan 26 15:26:21 2026
(Merged from https://github.com/openssl/openssl/pull/29646)

3 weeks agoPROV_R_INVALID_FUNCTION_NAME: Fix colliding error reason code
Tomas Mraz [Fri, 23 Jan 2026 14:33:42 +0000 (15:33 +0100)] 
PROV_R_INVALID_FUNCTION_NAME: Fix colliding error reason code

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Fri Jan 23 17:42:08 2026
(Merged from https://github.com/openssl/openssl/pull/29738)

3 weeks agoAdd support for CSHAKE.
slontis [Wed, 3 Sep 2025 07:48:30 +0000 (17:48 +1000)] 
Add support for CSHAKE.

Unlike SHAKE this has default values set for the xof length.

CSHAKE uses either SHAKE or KECCAK[c] depending on whether
custom strings are set or not. If either string is set, it encodes
the strings and uses KECCAK[c], otherwise it behaves the same as
SHAKE (without the default xof length problem).

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Fri Jan 23 14:07:53 2026
(Merged from https://github.com/openssl/openssl/pull/28432)

3 weeks agoRemove disabled-optimization warning again
Milan Broz [Thu, 22 Jan 2026 11:07:42 +0000 (12:07 +0100)] 
Remove disabled-optimization warning again

This warning does not play well in combination with sanitizers
and its value is dubious. Instead of complicated decisions
based on configuration flags just remove it from global list.

Fixes: #29673
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Fri Jan 23 14:00:29 2026
(Merged from https://github.com/openssl/openssl/pull/29714)

3 weeks agorsa_enc.c: Properly duplicate the oaep_label member
Tomas Mraz [Wed, 21 Jan 2026 18:11:30 +0000 (19:11 +0100)] 
rsa_enc.c: Properly duplicate the oaep_label member

Otherwise UAF and doublefree appears when the duplicate
is freed.
Reported by Tomas Dulka and Stanislav Fort (Aisle Research)

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Fri Jan 23 10:37:36 2026
(Merged from https://github.com/openssl/openssl/pull/29707)

3 weeks agorsa_sig.c: Properly duplicate the sig member
Tomas Mraz [Wed, 21 Jan 2026 18:10:28 +0000 (19:10 +0100)] 
rsa_sig.c: Properly duplicate the sig member

Otherwise UAF and doublefree appears when the duplicate
is freed.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Fri Jan 23 10:37:34 2026
(Merged from https://github.com/openssl/openssl/pull/29707)

3 weeks agoCorrect alert when extended master secret support is dropped
Tomas Mraz [Wed, 21 Jan 2026 17:50:07 +0000 (18:50 +0100)] 
Correct alert when extended master secret support is dropped

When resuming session with the extended master secret support
dropped we should use SSL_AD_HANDSHAKE_FAILURE instead of
SSL_AD_ILLEGAL_PARAMETER according to the RFC7627 section 5.

Fixes #9791

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Fri Jan 23 10:33:12 2026
(Merged from https://github.com/openssl/openssl/pull/29706)

3 weeks agoDOC: Add EVP_CIPHER_CTX_{get,set}_app_data documentation
Daniel Kubec [Wed, 21 Jan 2026 14:11:38 +0000 (15:11 +0100)] 
DOC: Add EVP_CIPHER_CTX_{get,set}_app_data documentation

Fixes #9788

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
MergeDate: Fri Jan 23 10:27:16 2026
(Merged from https://github.com/openssl/openssl/pull/29704)

3 weeks agoAdd SRTPKDF implementation
Helen Zhang [Wed, 17 Dec 2025 21:45:26 +0000 (21:45 +0000)] 
Add SRTPKDF implementation

      In compliance with RFC 3711, Section 4.3.3

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
MergeDate: Fri Jan 23 10:19:32 2026
(Merged from https://github.com/openssl/openssl/pull/29435)

3 weeks agoDOC: Clarify EVP_PKEY_CTX_{get,set}_app_data documentation
Daniel Kubec [Wed, 21 Jan 2026 22:48:58 +0000 (23:48 +0100)] 
DOC: Clarify EVP_PKEY_CTX_{get,set}_app_data documentation

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
MergeDate: Fri Jan 23 10:14:10 2026
(Merged from https://github.com/openssl/openssl/pull/29710)

3 weeks agocheck-news-changes.yml: Fix the label check
Neil Horman [Wed, 21 Jan 2026 15:12:15 +0000 (10:12 -0500)] 
check-news-changes.yml: Fix the label check

The yaml for the check-news-changes CI job had an error in the step
conditional that prevented skipping the check if the
no_news_changes_needed flag was set.  Fix that.

While we're add it, also add some debug code so that we can better see
what the checks are looking at during the CI job.

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Thu Jan 22 17:19:07 2026
(Merged from https://github.com/openssl/openssl/pull/29705)

3 weeks agoFix of EOF and retry handling in BIO implementations
Igor Ustinov [Mon, 15 Dec 2025 14:13:42 +0000 (15:13 +0100)] 
Fix of EOF and retry handling in BIO implementations

Added handling for negative length in read functions.

Fixes openssl/project#1739

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Thu Jan 22 17:12:37 2026
(Merged from https://github.com/openssl/openssl/pull/29401)

3 weeks agoFix NULL pointer dereference when zlib DSO fails to load
SiteRelEnby [Wed, 21 Jan 2026 02:57:52 +0000 (02:57 +0000)] 
Fix NULL pointer dereference when zlib DSO fails to load

When ZLIB_SHARED is defined and DSO_load() fails to load the zlib
library, ossl_comp_zlib_init() incorrectly returns 1 (success) while
leaving all function pointers (p_compress, p_uncompress, etc.) as NULL.

This causes COMP_zlib() and COMP_zlib_oneshot() to return valid-looking
COMP_METHOD pointers, but when these methods are used (e.g., during
TLS 1.3 certificate decompression), the NULL function pointers are
dereferenced, causing a SIGSEGV crash.

The bug occurs because the NULL pointer check (lines 297-303) was inside
the `if (zlib_dso != NULL)` block, so it was skipped entirely when
DSO_load() returned NULL.

The fix moves the NULL pointer check outside the conditional block,
consistent with how c_brotli.c and c_zstd.c handle this case. Now if
the DSO fails to load, all function pointers remain NULL, the check
catches this, and the function correctly returns 0 (failure).

This also fixes an incorrect cast of p_uncompress from compress_ft to
the correct uncompress_ft type.

PoC demonstrating the bug: https://github.com/SiteRelEnby/openssl-zlib-poc

Fixes #23563

CLA: trivial

Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Thu Jan 22 17:00:50 2026
(Merged from https://github.com/openssl/openssl/pull/29699)

3 weeks agoRemove unnecessary post-increment
JohnnySavages [Fri, 19 Dec 2025 03:43:41 +0000 (22:43 -0500)] 
Remove unnecessary post-increment

Found by Linux Verification Center (linuxtesting.org) with SVACE.

CLA:trivial

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Thu Jan 22 10:10:51 2026
(Merged from https://github.com/openssl/openssl/pull/29456)