Skip to content
Memory corruption Advisory Advanced CVE-2017-2782

InsideSecure MatrixSSL x509 certificate General Names Information Disclosure Vulnerability

An integer underflow in the parsing of X.509 certificate general names allows a crafted certificate to cause an out-of-bounds memory copy, potentially leaking sensitive memory or crashing the application.

Aleksandar Nikolic Follow

Originally disclosed on Cisco Talos

Medium 6.5 View original

An integer overflow vulnerability exists in the X509 certificate parsing functionality of InsideSecure MatrixSSL 3.8.7b. A specially crafted x509 certificate can cause a length counter to overflow, leading to a controlled out of bounds copy operation.

Aleksandar Nikolic, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely an unsigned 16-bit length counter is decremented without checking for underflow, allowing it to wrap to a large value and bypass bounds checks, leading to an out-of-bounds memcpy.

Impact

Depending on the use of the underlying library, this issue could be abused to leak sensitive memory or cause a crash, resulting in a denial of service.

What the attacker needed

Victim parses a crafted certificate

How it was found

  1. Craft an X.509 certificate with the general names extension length set to 1.
  2. Set the size of the first subject alternative name to a large value (e.g., 0x63).
  3. Adjust the rest of the certificate so that the malformed size points to an element with an ID other than zero.
  4. Present the certificate to a vulnerable client or server application during a secure connection.
  5. Trigger the parsing of the certificate, causing an out-of-bounds memcpy.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a program reads a certificate, it uses length values to know how much data to copy. If those lengths are manipulated, the program can be tricked into copying too much data from memory, which might expose private information or crash the program.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Aleksandar Nikolic

View all

147 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.