Closed cve-reporting closed 5 years ago
@cve-reporting,
Thank you so much for the report. We will work on reproducing the reported issue and update accordingly.
@cve-reporting,
Just so you are aware you are most welcome to report these via support@wolfssl.com so we have time to address the issue before it is public. It is most responsible to coordinate with an effected vendor before making details public to avoid 0-day exploits.
We appreciate all your hard work please keep the reports coming but please send them to support@wolfssl.com first if it is not too much to ask.
Thanks and Regards,
the wolfSSL team
@cve-reporting,
A fix has been opened here: https://github.com/wolfSSL/wolfssl/pull/2563
Can you shoot us an email at support@wolfssl.com once you have had a chance to review the fix please?
Warm Regards,
K
@kaleb-himes
Thank you for a quick confirmation of this issue and I really appreciate you efforts to quickly fix it. Next time I will first sent you information via an email, as you have proposed.
In past we (our team that shares this account for reporting) used to try disclose issues more responsibly, however recently our notifications were sometimes ignored, so we switched to direct reporting in an issue tracker.
@cve-reporting,
In past we (our team that shares this account for reporting) used to try disclose issues more responsibly, however recently our notifications were sometimes ignored, so we switched to direct reporting in an issue tracker.
Totally understandable! I can confidently say that with wolfSSL you will never experience this! Here is a blog post on how our team responds to any vulnerability report: https://www.wolfssl.com/everything-wanted-know-wolfssl-support-handles-vulnerability-reports-afraid-ask/
Thanks again for your teams efforts and hard work and willingness to coordinate with us on all future reports.
Sincerest Regards,
Registered as: CVE-2019-18840
WolfSSL in versions 4.1.0 and 4.2.0 incorrectly handles X.509 certificates leading to a heap-buffer overflow inside the DecodedCert structure, overwriting a NULL pointer and as a result crash during memory deallocation. This vulnerability affects both client and server in two supported protocols: TLS and DTLS.
During processing of a crafted certificate, WolfSSL incorrectly handles the loc buffer in the DecodedName structure. In the following line the count variable reaches value 21, while the loc table has fixed size 19: wolfcrypt/src/asn.c:5121:
Declarations: wolfssl/wolfcrypt/asn.h:
Overflow of the loc table in the issuerName leads to overwritting of the fullName pointer in the subjectName. During deallocation in the FreeDecodedCert check for cert->subjectName.fullName is ineffective, leading to execution of the free() function on the overwritten pointer.
Crashing function: wolfcrypt/src/asn.c:4505:
Proposed CVSS 3.0 score:
7.5 (High) CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Crash on DTLS client connection (parsing cert from incoming network packets):
Crash on DTLS server startup (loading cert from local drive):
Crash on DTLS client startup (loading cert from local drive):
Crash on TLS client connection (parsing cert from incoming network packets):
Crash on TLS client startup (loading cert from local drive):
Crash on TLS server startup (loading cert from local drive):
Reproduction:
Download and compile WolfSSL 4.2.0 or 4.1.0. Unzip and use attached crafted certificate with above commands (./example/server/server -c ... or ./example/client/client -c ...).
crash_000_FreeDecodedCert.zip
Credit:
Jakub Botwicz (Samsung R&D Poland)