Public Security Advisories
Coordinated vulnerability disclosures from Argus. Findings, impact, and remediation, published in good faith.
On heap-math builds the TLS 1.3 pre-master secret buffer is 512 bytes (578 with PSK), but an FFDHE-6144 or FFDHE-8192 key share produces a 768 or 1024-byte shared secret. wolfSSL wrote the secret without checking the buffer size, so a peer that negotiates one of those groups causes a heap write of up to 512 bytes past the buffer before authentication.
The wolfSSL sniffer decrypts TLS 1.3 sessions that use a static DH key by computing the shared secret into a 512-byte buffer (heap-math builds) with no size check. With a 6144 or 8192-bit static key, any captured handshake that uses a finite-field group makes the sniffer write up to 512 bytes past the buffer.
GetSesionFromCacheOrExt passed the external session cache get callback a copy flag that started at 0, and wolfSSL released the returned session whenever the flag was still 0. A callback that kept its session and did not write the flag had it freed, and the next TLS 1.3 resumption with the same ticket identity read and released freed memory.
In static-memory builds with WOLFSSL_TICKET_NONCE_MALLOC, a TLS 1.3 ticket nonce longer than the inline buffer is allocated from the connection's memory pool and stored in the session cache, which later frees it with a NULL heap hint. A server that sends a long nonce makes the client pass a pool-interior pointer to the system allocator when the entry is evicted.
For TLS 1.3 records the wolfSSL sniffer derives the padding size from the decrypted plaintext and does not bound it. The handshake record loop advances by that size without adjusting its remaining-bytes count, so a following handshake message can make the sniffer read up to about a full record length past the heap buffer that holds the decrypted record.
With WOLFSSL_THREADED_CRYPT, the per-record AES-GCM nonce field that the worker-thread encrypt call reads is populated from the connection IVs only in old FIPS builds and is otherwise left at zero. The worker's error return is discarded and eight bytes of that field are copied into the record. In ByteRay's tests the peer rejected these records while wolfSSL_write reported success.
With WOLFSSL_THREADED_CRYPT, application records are handed to worker threads for encryption. The TLS 1.3 record builder has no such handoff and encrypts inline, but the send path still queues the finished record as a TLS 1.2 job. With AES-GCM the worker corrupts the record before it is sent; with other suites the record is never sent and the seventeenth write spins forever.
When a session with an oversized ticket is added to the session cache, wolfSSL allocates the temporary ticket buffer with a NULL heap hint but one error path frees it with the session's static-pool hint. In static-memory builds the system-heap block is linked into the pool's free list.
When a session cache entry is overwritten, wolfSSL frees the old entry's dynamically allocated TLS 1.3 ticket nonce with the heap hint of the connection doing the overwrite, not the one that allocated it. In static-memory builds that mix heap hints over the shared cache, the buffer goes to the wrong allocator.
wolfSSL_clear() does not free the ECH retry configurations stored on a client object or clear their accepted flag. After one ECH rejection, any later rejection on the recycled object fails with a fatal error in SetRetryConfigs, and the getter can return the previous connection's retry configurations.
wolfSSL_clear() does not reset ssl->options.echAccepted, and no server code path clears it. After one accepted ECH connection, a recycled server object answers any later ClientHello whose ECH extension fails to decrypt, including GREASE, with a fatal decrypt_error alert instead of falling back to the outer ClientHello.
wolfSSL_clear() re-initializes the main handshake transcript but leaves the ECH transcript state in ssl->hsHashesEch. After an ECH handshake is aborted and the object is recycled, the next ECH handshake hashes its inner ClientHello onto the previous connection's transcript, the acceptance confirmation cannot match, and the handshake fails.
A TLS 1.3 stateful ticket is a 32-byte identity that indexes the process-wide session cache. The lookup matches on identity and side only, so a ticket issued by one WOLFSSL_CTX resumes on another in the same process, which then skips its own client authentication.
In keylog-export builds, wolfSSL appends every TLS 1.3 traffic secret to sslkeylog.log in the working directory through a plain fopen call. The file gets umask-governed permissions, so on a common umask any local account can read it and decrypt the process's TLS 1.3 sessions.
A TLS 1.3 client records that the server selected a pre-shared key in a flag that wolfSSL_clear does not reset. After a PSK or resumption handshake, a client object that is cleared and reused rejects the next full certificate handshake with a message-ordering error. The stale flag does not let a server skip authentication.
The wolfSSL sniffer reads the two-byte PSK identity length from a ClientHello pre-shared-key extension before it checks that those bytes lie inside the extension. A truncated extension of 2 or 3 bytes causes a read of up to two bytes past the extension and, at the end of an exactly sized input buffer, past the heap allocation.
When DoTls13ServerHello fails, DoServerHello sends a fatal alert only if TranslateErrorToAlert knows the error code. For codes outside its list, such as MEMORY_E, it returns invalid_alert and the client closes the connection without sending any alert.
SendAlert_ex writes the alert history before the alert is flushed and does not revert it when the flush fails. The duplicate-alert guards in the TLS 1.3 handshake dispatcher and in DoServerHello then read a fatal alert as already sent and skip every later alert on the connection.
TranslateErrorToAlert maps a fixed list of error codes to TLS 1.3 alerts and returns invalid_alert for all others. The handshake dispatcher sends no alert for that value, so errors such as MEMORY_E, SIDE_ERROR and VERIFY_FINISHED_ERROR end a TLS 1.3 handshake without an alert.
The client-authentication fail-safe in wolfSSL_accept_TLSv13 returns WOLFSSL_FATAL_ERROR without storing a cause in ssl->error. wolfSSL_get_error then returns a leftover value, zero or a stale WANT_READ or WANT_WRITE, so an application can misread a fatal authentication failure.
The server-authentication fail-safe in wolfSSL_connect_TLSv13 returns WOLFSSL_FATAL_ERROR without storing a cause in ssl->error. wolfSSL_get_error then returns a leftover value, zero or a stale WANT_READ or WANT_WRITE, and a retried connect call hits the same check again.
When a TLS 1.3 server selects the client's resumption PSK, the wolfSSL client marks the server as authenticated without consulting any record of whether the original session verified a certificate. A ticket obtained without verification resumes on a connection that requires it, and the verify result reads as success.
In asynchronous-crypto builds, two pend-resume blocks in the TLS 1.3 record receiver add the record padding length to the input cursor without checking the cursor against the buffer length. No current input reaches these blocks with an over-advanced cursor; the gap matters for fixes that guard only the normal record-done path.
Two server-side early-data exits in DoProcessReplyEx add the record padding size to the shared input cursor and return success without comparing the cursor to the buffered length. Every current server-side TLS 1.3 handler consumes its message exactly, so this is a missing check and not a reachable out-of-bounds access.
DoTls13HandShakeMsgType checks that a handshake message fits in the buffer before dispatch but never checks afterwards that the handler consumed exactly the message. The TLS 1.2 dispatcher has that check. A TLS 1.3 handler that over-advances the record cursor and returns success is therefore not caught at the dispatcher.
// No embargoed advisories.