{"uuid": "e55e9609-456d-4ad1-a8b2-acf9b2861bab", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "9f56dd64-161d-43a6-b9c3-555944290a09", "vulnerability": "CVE-2022-38152", "type": "seen", "source": "https://t.me/hacking_Attack/86304", "content": "Exploit Collector\nwolfSSL Session Resumption Denial Of Service\n\nhttps://4.bp.blogspot.com/-1sVwQJsRVpo/WWlvgaUDftI/AAAAAAAAIQM/9m_QfduSdAQi14Fs6kLQe2-YLO5Bx1iKQCLcBGAs/s1600/h87.png wolfSSL versions prior to 5.5.0 suffer from a denial of service condition related to session resumption. When a TLS 1.3 client connects to a wolfSSL server and SSL_clear is called on its session, the server crashes with a segmentation fault. The bug occurs after a client performs a handshake against a wolfSSL server and then closes the connection. If the server reuses the previous session structure (struct WOLFSSL) by calling wolfSSL_clear(WOLFSSL* ssl) on it, the next received Client Hello, which resumes the previous session, crashes the server. Note, that this bug only exists in resumed handshakes using TLS session resumption. This bug was discovered using the novel symbolic-model-guided fuzzer tlspuffin.\n\nSHA-256 | 1b9325efbf39604c8462f0298d0d79f674ddf2937457ea4559d7da387dd41a30Download # wolfSSL before 5.5.0: Denial-of-service with session resumption\n=================================================================\n\n## INFO\n=======\n\nThe CVE project has assigned the id CVE-2022-38152 to this issue.\n\nSeverity: 7.5 HIGH\nAffected version: before 5.5.0\nEnd of embargo: Ended August 30, 2022\n\n## SUMMARY\n==========\n\nWhen a TLS 1.3 client connects to a wolfSSL server and SSL_clear is called on\nits session, the server crashes with a segmentation fault. The bug occurs after\na client performs a handshake against a wolfSSL server and then closes the\nconnection. If the server reuses the previous session structure (struct WOLFSSL)\nby calling wolfSSL_clear(WOLFSSL* ssl) on it, the next received Client Hello,\nwhich resumes the previous session, crashes the server. Note, that this bug only\nexists in resumed handshakes using TLS session resumption. This bug was\ndiscovered using the novel symbolic-model-guided fuzzer tlspuffin.\n\n## DETAILS\n==========\n\nLine numbers below are valid for the wolfSSL Git tag v5.4.0-stable. The\nvulnerability is exploitable with default compilation flags. If the\n--enable-postauth flag is used, then this bug is no longer exploitable. When\ncreating a new TLS session (represented by a struct WOLFSSL), a struct called\narrays is allocated in internal.c:6652.\n\n```\nint InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)\n{\n...\nssl-&gt;arrays = (Arrays*)XMALLOC(sizeof(Arrays), ssl-&gt;heap,\nDYNAMIC_TYPE_ARRAYS);\n...\n}\n```\n\nNote that this function is only called when creating a new session structure\nusing wolfSSL_new. After a handshake is done, resources related to it are freed\nby default using the FreeHandshakeResources function in line ssl.c:3735. This\nfrees the memory behind ssl-&gt;arrays and sets the pointer to NULL.\n\n```\nvoid FreeHandshakeResources(WOLFSSL* ssl)\n{\n...\nif (!ssl-&gt;options.tls1_3)\nFreeArrays(ssl)\n...\n}\n\nvoid FreeArrays(WOLFSSL* ssl)\n{\n...\nssl-&gt;arrays = NULL;\n}\n```\n\nIf the compile flag --enable-postauth is not set, the variable options.tls1_3 is\nfalse, and therefore the arrays are freed. If --enable-postauth is set, then the\narrays are not freed. The above code is executed during the handshake of a fresh\nsession. Users of wolfSSL might not allocate a new session by using\nwolfSSL_new(), but reuse a previous struct WOLFSSL. This can be done by calling\nwolfSSL_clear(WOLFSSL* ssl) on the previous session and reusing the struct. The\nnext abbreviated handshake, which resumes the previous connection, will now\ncause a segmentation fault in tls13.c:5296.  The segmentation fault occurs\nbecause the arrays pointer still points to NULL as InitSSL is not called before\nthe Client Hello is handled.\n\n## AFFECTED VERSIONS\n====================\n\nwolfSSL 5.3.0 and 5.4.0 are affected The server needs to handle sessions in a\nnon-default way by using wolfSSL_clear\n\n## SUGGESTED REMEDIATION\n========================\n\nAfter a session has been cleared and is reused for the next client, it should be\nreinitialized. Source:packetstormsecurity.com", "creation_timestamp": "2026-09-02T01:01:26.582328Z"}