Public Security Advisories
Coordinated vulnerability disclosures from Argus. Findings, impact, and remediation, published in good faith.
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.
In the wolfSSL sniffer, the handshake case of the record loop advances its cursor past the decryption trailer but does not reduce the remaining-bytes count by the same amount. A following handshake message in the same record is then length-checked against a stale count, and the sniffer reads past the end of the heap buffer that holds the decrypted record.
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.
The wolfSSL sniffer discards a handshake message that continues in a later TLS record unless the rest of the message is already buffered. An endpoint of a monitored connection can fragment its handshake so that the sniffer never decodes the session.
sslSniffer/sslSniffer.vcxproj compiles the sniffer at MSVC warning level 3 in all six configurations, Debug included, and does not treat warnings as errors. The sniffer source gets fewer MSVC diagnostics than the library's Debug builds. This is a build-hardening observation and not a vulnerability in the sniffer code.
The wolfSSL sniffer grows its decrypted-data buffer with a realloc for each application-data record. When the allocator moves the block, the old block is released with the plaintext decoded so far still in it. The failure path of the same call clears the buffer; the success path does not.
In the wolfSSL sniffer, GetSnifferServer returns the last entry of the server list when no registered server matches a new connection. The caller checks only for NULL, so the flow is accepted and bound to that server's SSL context instead of being rejected as not registered.
In sniffer builds that define the SHOW_SECRETS debug macro, the key setup routine prints the recovered pre-master secret, or the TLS 1.3 key exchange shared secret, of every decoded session to standard output in hex. A reader of the captured output can decrypt those sessions.
In sniffer builds that define the SHOW_SECRETS debug macro, the sniffer prints the master secret of both sides of each decoded session, and the TLS 1.3 resumption secret, to standard output in hex. A reader of the captured output can decrypt those sessions.
When the wolfSSL sniffer recovers from missed data it scans buffered TCP segments for the start of a TLS record and reads three bytes from each buffer without checking its length. A buffered segment of one or two bytes is read past the end of its heap allocation, by one byte and at most two.
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.
In the sniffer's static-RSA key setup, SetupKeys skips the two-byte length prefix of the ClientKeyExchange body and then checks the RSA ciphertext length against the byte count from before the skip. A body exactly as long as the ciphertext, or one byte longer, makes the RSA decryption read up to two bytes past the heap buffer that holds the message.
In the sniffer's static-ECC key setup, SetupKeys skips the one-byte length prefix of the ClientKeyExchange body and then checks the encoded point length against the byte count from before the skip. A body of exactly the expected point size makes the ECC point import read one byte past the heap buffer that holds the message.
The wolfSSL sniffer probes the first four bytes of a new data segment for an SSLv2-style hello after checking only that one byte is present. A 1 to 3 byte segment is read up to three bytes past its end; with chained input the read can cross the end of an exactly sized heap buffer.
The sniffer's Certificate handler advances past the 3-byte certificate length without reducing its remaining-byte count. The following length check accepts a certificate size up to 3 bytes larger than the data present, and the watch-mode code hashes that span, reading up to 3 bytes past the heap input buffer.
The wolfSSL sniffer frees its per-flow TCP reassembly buffers without clearing them when a monitored session is torn down. Captured TLS records, with their headers and ciphertext, remain in freed heap memory of the sniffing process.
In the wolfSSL sniffer, LoadNamedKey returns success when no registered named key matches the server name in a ClientHello. The session continues with no private key, the caller's diagnostic is never recorded, and the server name is missing from the monitoring output.
// No embargoed advisories.