<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openssl/ssl/statem, branch master</title>
<subtitle>TLS/SSL and crypto library.</subtitle>
<id>http://git.bktus.com/gpgfrontend/openssl/atom?h=master</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/openssl/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/'/>
<updated>2026-10-21T16:45:28Z</updated>
<entry>
<title>TLS: Generate the server random before processing ClientHello extensions</title>
<updated>2026-10-21T16:45:28Z</updated>
<author>
<name>Daniel Kubec</name>
<email>kubec@openssl.foundation</email>
</author>
<published>2026-10-08T11:56:29Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=ef27df134327a62ff40985c6f0c0438cbc802de2'/>
<id>urn:sha1:ef27df134327a62ff40985c6f0c0438cbc802de2</id>
<content type='text'>
The server random was only generated after all of the ClientHello extensions had
been processed. In (D)TLSv1.3 the PSK callbacks are invoked while the
pre_shared_key extension is being parsed, so a call to SSL_get_server_random()
from within them returned all zeros. The TLSv1.2 psk_server_callback runs during
ClientKeyExchange processing and so already observed the real value, making the
behaviour inconsistent between protocol versions.

Move the generation of the server random to immediately after the protocol
version has been selected  and before any of the remaining ClientHello
processing. As a result the server random is also visible from the other
callbacks invoked during ClientHello processing, such as the session ticket and
servername callbacks.

Fixes #26404

Assisted-by: Claude:claude-fable-5-1
Reviewed-by: Tomas Mraz &lt;tomas@openssl.foundation&gt;
Reviewed-by: Frederik Wedel-Heinen &lt;fwh.openssl@gmail.com&gt;
Merge-date: Wed Oct 21 16:45:34 2026
Merged-from: https://github.com/openssl/openssl/pull/33102
</content>
</entry>
<entry>
<title>Cache decoded certs on client in CTX to avoid multiple asn1 parsing</title>
<updated>2026-10-21T16:44:28Z</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@openssl.org</email>
</author>
<published>2026-05-14T15:39:05Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=54dacb1710cf0dd00d7c6f2c4c7ee7a19d5028a4'/>
<id>urn:sha1:54dacb1710cf0dd00d7c6f2c4c7ee7a19d5028a4</id>
<content type='text'>
our TLS client path has to do an ASN1 decode on every new connection it
establishes.  Other TLS stacks (notably rustls) seems to not do this
decode, opting instead to to do just enough der parsing to verify the
certificate chain.

We can't really do that, but we can maybe do some things to speed up
this path.  Most notably we can cache the received certificate der
string in the SSL_CTX along with a previously decoded X509 certificate
to avoid the overhead of additional ASN1 parsings in future connections

Reviewed-by: Bob Beck &lt;beck@openssl.org&gt;
Reviewed-by: Nikola Pajkovsky &lt;nikolap@openssl.org&gt;
Merge-date: Wed Oct 21 16:44:29 2026
Merged-from: https://github.com/openssl/openssl/pull/33085
</content>
</entry>
<entry>
<title>Fix TLS 1.3 alert for missing key_share</title>
<updated>2026-10-21T16:27:38Z</updated>
<author>
<name>Anuj Ramesh</name>
<email>37349553+anujramesh@users.noreply.github.com</email>
</author>
<published>2026-04-15T18:02:05Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=f1be37eac8f6ee72fa5ff5832a469f28827c78dd'/>
<id>urn:sha1:f1be37eac8f6ee72fa5ff5832a469f28827c78dd</id>
<content type='text'>
Fixes #30818

Co-authored-by: Anuj Ramesh &lt;37349553+anujramesh@users.noreply.github.com&gt;
Assisted-by: Claude:claude-fable-5
Reviewed-by: Matt Caswell &lt;matt@openssl.foundation&gt;
Reviewed-by: Frederik Wedel-Heinen &lt;fwh.openssl@gmail.com&gt;
Merge-date: Wed Oct 21 16:29:21 2026
Merged-from: https://github.com/openssl/openssl/pull/32527
</content>
</entry>
<entry>
<title>ssl: handle session ID cache lock failure</title>
<updated>2026-10-21T16:24:43Z</updated>
<author>
<name>Mounir IDRASSI</name>
<email>mounir.idrassi@idrix.fr</email>
</author>
<published>2026-08-12T09:53:22Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=ced1ca3a0be6f1c4d512805cba16ad4655004fd5'/>
<id>urn:sha1:ced1ca3a0be6f1c4d512805cba16ad4655004fd5</id>
<content type='text'>
SSL_has_matching_session_id() returns 0 both when no matching session
exists and when the cache lock cannot be acquired. Its use in the
built-in generator's retry loop and the final uniqueness check can
therefore treat a lock failure as proof that no conflict exists.

Add an internal tri-state lookup. The final uniqueness check uses it as
a backstop for IDs produced by both built-in and application callbacks,
recording an internal fatal error when the cache cannot be checked. The
retry loop also uses it to prevent the built-in generator from returning
an ID after its own lookup failed, through the existing callback failure
path. Preserve the public API's boolean contract.

Correct the callback-selection cache lock failure reason from
SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED to ERR_R_INTERNAL_ERROR.

Remove a redundant caller-side SSLfatal() that appended a generic
ERR_R_INTERNAL_ERROR after the specific error already recorded. Add a
deterministic unit test for final cache lookup failure.

Fixes #32358

Assisted-by: Codex:gpt-5.6-sol
Reviewed-by: Tomas Mraz &lt;tomas@openssl.foundation&gt;
Reviewed-by: Dmitry Belyavskiy &lt;beldmit@gmail.com&gt;
Merge-date: Wed Oct 21 16:25:29 2026
Merged-from: https://github.com/openssl/openssl/pull/32359
</content>
</entry>
<entry>
<title>Don't dereference a NULL rbio in dtls1_read_failed()</title>
<updated>2026-10-20T13:29:57Z</updated>
<author>
<name>Matt Caswell</name>
<email>matt@openssl.foundation</email>
</author>
<published>2026-10-19T08:14:08Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=152ac8b6cadd2cb611154f90228466cf2b4c143d'/>
<id>urn:sha1:152ac8b6cadd2cb611154f90228466cf2b4c143d</id>
<content type='text'>
Connections created by a DTLS listener have no read BIO; they read
from a queue that the listener's demux fills. dtls1_read_failed()
still set BIO_FLAGS_READ on the read BIO unconditionally once the
handshake had finished.

A DTLS 1.3 server keeps its retransmission timer armed after the
handshake until the client ACKs the NewSessionTickets. A client that
never sends that ACK can arrange for the timer to expire while a
non-blocking SSL_read() on the server is pumping the demux and finds
no record (for example, by sending datagrams the record layer
discards). dtls1_read_bytes() then calls dtls1_read_failed(), which
crashes on the NULL BIO.

Skip setting the flag when there is no read BIO. SSL_get_error()
already returns SSL_ERROR_WANT_READ for listener connections without
one.

The DTLS listener has not been in any final release, so no released
version of OpenSSL is affected.

Discovered by Anthropic's OSS Scanner (finding ANT-2026-NPC3SFSW).

Assisted-by: Claude Code:claude-opus-5-5
Reviewed-by: Tomas Mraz &lt;tomas@openssl.foundation&gt;
Reviewed-by: Mounir Idrassi &lt;mounir.idrassi@idrix.fr&gt;
Reviewed-by: Nikola Pajkovsky &lt;nikolap@openssl.org&gt;
Merge-date: Tue Oct 20 13:30:03 2026
Merged-from: https://github.com/openssl/openssl/pull/33257
</content>
</entry>
<entry>
<title>DTLS 1.3: only accept plaintext alerts once the hellos are done</title>
<updated>2026-10-20T12:38:12Z</updated>
<author>
<name>Matt Caswell</name>
<email>matt@openssl.foundation</email>
</author>
<published>2026-10-19T08:08:14Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=eeb5f65fb3b6ef3a57fa7847c0242fcbf8c0d2dc'/>
<id>urn:sha1:eeb5f65fb3b6ef3a57fa7847c0242fcbf8c0d2dc</id>
<content type='text'>
DTLS 1.3 defers installing the handshake read keys until the peer's
first epoch 2 record arrives. Until then the read record layer stays in
epoch 0 and accepted plaintext handshake and ACK records. A peer that
never sends an epoch 2 record could therefore send its Finished in
plaintext. That Finished was checked with a finished key that was never
derived (all zero), and the connection completed with its application
read keys numbered epoch 1 instead of 3.

From that state a client can ACK only the second NewSessionTicket and
then send a record claiming epoch 2. The server performs the deferred
key change on the established connection, and dtls1_clear_sent_buffer()
on the partly acknowledged queue leaves a freed item linked in
sent_messages, which is a use-after-free. A malicious server can do the
same to a client.

Once the hellos are done, tell the epoch 0 read layer that only
plaintext alerts may still arrive, and discard any handshake fragments
buffered before then. Make tls_process_finished() refuse a DTLS 1.3
Finished read before the handshake keys are installed. Disarm the
deferred key change once it has run, and reset it with the connection.

DTLS 1.3 has not been in any final release, so no released version of
OpenSSL is affected.

Discovered by Anthropic's OSS Scanner (finding ANT-2026-YZ5U4MXB).

Assisted-by: Claude Code:claude-opus-5-5
Reviewed-by: Tomas Mraz &lt;tomas@openssl.foundation&gt;
Reviewed-by: Mounir Idrassi &lt;mounir.idrassi@idrix.fr&gt;
Reviewed-by: Daniel Kubec &lt;kubec@openssl.foundation&gt;
Merge-date: Tue Oct 20 12:38:20 2026
Merged-from: https://github.com/openssl/openssl/pull/33256
</content>
</entry>
<entry>
<title>TLS 1.3: Enforce the ticket lifetime when offering a ticket</title>
<updated>2026-10-19T12:34:18Z</updated>
<author>
<name>Daniel Kubec</name>
<email>kubec@openssl.foundation</email>
</author>
<published>2026-09-25T08:43:51Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=4d12497b6499eb57a5d9e77d46d15abdd8a2ba98'/>
<id>urn:sha1:4d12497b6499eb57a5d9e77d46d15abdd8a2ba98</id>
<content type='text'>
Bound the effective lifetime to 604800 seconds and treat a zero lifetime as
unusable in tls13_check_tick_lifetime_hint(), which gates both the
pre_shared_key offer and the early_data advertisement. The cap in the message
parser is kept so that SSL_SESSION_get_ticket_lifetime_hint() and the session
cache callbacks keep seeing the capped value for tickets received from the
wire.

- RFC 9846 4.7.1: Servers MUST NOT use any value greater than 604800 seconds
  (7 days). The value of zero indicates that the ticket should be discarded
  immediately. Clients MUST NOT use tickets for longer than 7 days after
  issuance, regardless of the ticket_lifetime, and MAY delete tickets earlier
  based on local policy. A server MAY treat a ticket as valid for a shorter
  period of time than what is stated in the ticket_lifetime.

Complements: 17bf6c48ea8a "TLS 1.3: Suppress early_data on PSK ticket age mismatch"
Complements: 66985198d233 "TLS 1.3: Apply the cap to the lifetime hint in the session"
Co-authored-by: Mounir IDRASSI &lt;mounir.idrassi@amcrypto.jp&gt;
Reviewed-by: Mounir Idrassi &lt;mounir.idrassi@idrix.fr&gt;
Reviewed-by: Tomas Mraz &lt;tomas@openssl.foundation&gt;
Reviewed-by: Eugene Syromiatnikov &lt;esyr@openssl.org&gt;
Merge-date: Mon Oct 19 12:37:00 2026
Merged-from: https://github.com/openssl/openssl/pull/32808
</content>
</entry>
<entry>
<title>PSK: Check for invalid server PSK ciphers</title>
<updated>2026-10-09T13:56:02Z</updated>
<author>
<name>Viktor Dukhovni</name>
<email>viktor@openssl.org</email>
</author>
<published>2026-07-14T14:30:02Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=bbac7bd03284afbca2bcdbbaf2f7b776af6bf46f'/>
<id>urn:sha1:bbac7bd03284afbca2bcdbbaf2f7b776af6bf46f</id>
<content type='text'>
If an application fails to set the PSK session cipher, or sets it
to a TLS 1.2 cipher by mistake, skip the invalid PSK, avoiding a
crash or an invalid outcome.

Tests added to make sure a full handshake takes place instead.

Reviewed-by: Mounir Idrassi &lt;mounir.idrassi@idrix.fr&gt;
Reviewed-by: Nikola Pajkovsky &lt;nikolap@openssl.org&gt;
Merge-date: Fri Oct  9 13:56:05 2026
Merged-from: https://github.com/openssl/openssl/pull/31925
</content>
</entry>
<entry>
<title>Polish psk callback error path cleanup</title>
<updated>2026-10-09T13:56:02Z</updated>
<author>
<name>Viktor Dukhovni</name>
<email>viktor@openssl.org</email>
</author>
<published>2026-07-22T04:00:25Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=2e214d3a3b1fbe4a7ac18bafd4ed8a7bcf0d05e6'/>
<id>urn:sha1:2e214d3a3b1fbe4a7ac18bafd4ed8a7bcf0d05e6</id>
<content type='text'>
- Avoid SSL_SESSION leak
- Always cleanse the returned PSK secret

Reviewed-by: Mounir Idrassi &lt;mounir.idrassi@idrix.fr&gt;
Reviewed-by: Nikola Pajkovsky &lt;nikolap@openssl.org&gt;
Merge-date: Fri Oct  9 13:56:04 2026
Merged-from: https://github.com/openssl/openssl/pull/31925
</content>
</entry>
<entry>
<title>Test PHA verification results across session resumption</title>
<updated>2026-10-08T16:16:15Z</updated>
<author>
<name>Mounir IDRASSI</name>
<email>mounir.idrassi@idrix.fr</email>
</author>
<published>2026-09-14T08:26:11Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=b86f4c163100a4626597d28126c8b6807a83d1dc'/>
<id>urn:sha1:b86f4c163100a4626597d28126c8b6807a83d1dc</id>
<content type='text'>
An application verification callback may accept a nonempty client
certificate or RPK while retaining a nonzero verification error. That
result must survive post-handshake authentication and resumption,
without changing the previously published session.

Expand pending-identity coverage to exercise X.509 and RPK replacement
with successful and callback-accepted error results, using stateful
and stateless refreshed tickets. Check the replacement identity and
result on the live connection and session, then on a resumed connection.
Also check that the retained cache-owned session remains unchanged.

Start empty-RPK tests with a nonzero prior verification result. An
optional empty response must remove that stale result, while a required
empty response must fail without replacing the previous session state.

Document that the empty-response helper retains the SSL_get_verify_result()
semantics for an absent peer certificate: X509_V_OK does not establish
authentication. The helper does not clear errors for supplied credentials.
Remove two unused local pointer resets immediately before successful
parse returns. No library verification-result behavior is changed.

Validation: debug --strict-warnings build; test_sslapi, test_rpk,
test_dtls and test_dtls13_internal all pass (no-fips).

Assisted-by: Codex:gpt-6-astra
Reviewed-by: Neil Horman &lt;nhorman@openssl.org&gt;
Reviewed-by: Matt Caswell &lt;matt@openssl.foundation&gt;
Reviewed-by: Tomas Mraz &lt;tomas@openssl.foundation&gt;
Merge-date: Thu Oct  8 16:16:17 2026
Merged-from: https://github.com/openssl/openssl/pull/32638
</content>
</entry>
</feed>
