Public Security Advisories
Coordinated vulnerability disclosures from Argus. Findings, impact, and remediation, published in good faith.
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.
A wolfSSL server marks the peer as authenticated as soon as it accepts a session ticket or TLS 1.3 PSK. The ticket does not record whether the original session presented a client certificate, so a ticket issued without client authentication resumes on a connection that requires a certificate.
A wolfSSL server sets options.useTicket when a ClientHello carries a session ticket extension and no reset path clears it. On an object reused with wolfSSL_clear(), a later ClientHello with any session ID resumes the retained session and derives keys from a master secret that wolfSSL_clear() zeroed.
A wolfSSL DTLS 1.3 client whose ECH offer was not accepted skips NewSessionTicket messages by advancing the record cursor by the message size plus the record padding, which the record layer also counts. The input-buffer index ends past the buffered data, and later datagrams are parsed against corrupted buffer state.
When replacing a heap-allocated session ticket fails to allocate, wolfSSL_set_SessionTicket and SetTicket point the session back at its small static ticket buffer but keep the length of the released ticket. Later code trusts that length: a resumption ClientHello sends bytes from beyond the static buffer to the peer, and a later ticket copy can write past it.
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.
A TLS 1.2 or DTLS 1.2 session ticket carries the session ID context of the connection that issued it, but the server never compares that context when the ticket is presented. A ticket issued under one context resumes under another that shares the ticket-encryption key, with peer authentication taken as done.
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.
wolfSSL_i2d_SSL_SESSION copies ticketLen bytes from the session's ticket pointer without checking that length against the buffer the pointer refers to. After an allocation failure leaves the pointer on the small static ticket buffer with the length of a larger, released ticket, serialization reads past that buffer and places adjacent heap memory in the output blob.
When a server application supplies the master secret through a session-secret callback, the TLS 1.2 resumption code marks the peer as authenticated and returns before the ticket expiry check. An expired ticket that still decrypts completes resumption with the peer-authentication flag set.
When AddSessionToCache overwrites an existing cache entry and the new ticket needs a larger buffer, the previous dynamically allocated ticket is freed without being wiped. The old ticket stays in freed heap memory until the allocator reuses the block.
CreateTicket switches the session back to its static ticket buffer before building a new ticket. If the session's ticket was in a heap buffer, that buffer is freed without being wiped, and the previously installed ticket stays in freed heap memory.
When a server restores TLS 1.3 session state from a client ticket and the session's ticket nonce is in a heap buffer, the old nonce buffer is freed without being wiped. The path exists only in builds with WOLFSSL_TICKET_NONCE_MALLOC.
In builds with dynamic ticket nonces, SessionTicketNoncePopulate frees the previous TLS 1.3 ticket nonce without clearing it before it stores a new one. The old nonce stays in freed heap memory on every ticket renewal and on session deserialization.
When a new session ticket replaces a stored one, SetTicket and wolfSSL_set_SessionTicket free the previous heap-allocated ticket without clearing it. The old ticket, which a server may still accept, remains in freed heap memory after every renewal.
When wolfSSL_d2i_SSL_SESSION parses a serialized session into a session object that already holds a heap-allocated ticket, it frees the old ticket without clearing it. The previous ticket remains in freed heap memory.
When wolfSSL_DupSessionEx copies a session over one that already holds a heap-allocated ticket, the old ticket buffer is freed or reallocated without being cleared on every path. The previous ticket remains in freed heap memory.
wolfSSL_FreeSession clears the master secret and session id before freeing a session but releases the heap-allocated session ticket and TLS 1.3 ticket nonce without clearing them. EvictSessionFromCache has the same gap. Ticket material remains in freed heap memory.
During a session cache lookup, wolfSSL_GetSessionFromCache frees the destination session's existing heap-allocated ticket without clearing it before it installs a preallocated buffer. The previous ticket remains in freed heap memory on the resumption path.
wolfSSL compares a ticket's or cached session's session ID context with the receiving endpoint's only when the receiver has one configured. An endpoint with no context, the default, accepts sessions created under any other context that shares its ticket keys or session cache.
The TLS 1.3 ticket lifetime check in wolfSSL rejects tickets that are too old but not tickets whose timestamp is ahead of the server clock. After a backward clock step, a ticket holder can choose its obfuscated ticket age to pass the second age check and resume an expired ticket.
The TLS 1.2 and DTLS 1.2 resumption path treats a session as expired only when the server clock is past its creation time plus the timeout. A ticket whose creation time is ahead of the clock, as after a backward clock step, is never rejected and resumes beyond its intended lifetime.
// No embargoed advisories.