CVE-2016-8671: MatrixSSL cryptographic key recovery via pstm_exptmod miscalculation

CVE-2016-8671 · Severity: medium · CVSS 5.9 · Published 2017-01-13

MatrixSSL, a lightweight TLS/SSL library often used in embedded and IoT devices, contains a flaw in its cryptographic calculations. This vulnerability could allow a remote attacker to potentially recover secret encryption keys by exploiting mathematical errors during secure connections. If successful, an attacker could decrypt sensitive communications or impersonate trusted services.

Technologies: Matrixssl. Vendors: Matrixssl.

Quick answers

Is CVE-2016-8671 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2016-8671 being exploited in the wild.
How severe is CVE-2016-8671?
Medium severity, with a CVSS score of 5.9, published 13 January 2017.
Which products and versions are affected?
MatrixSSL MatrixSSL 3.8.6 and earlier.
Is there a fix for CVE-2016-8671?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2016-8671 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2016-8671?
Check whether you run Matrixssl. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A vulnerability exists in the pstm_exptmod function within MatrixSSL's bignum implementation. The function fails to properly perform modular exponentiation for certain inputs, leading to incorrect mathematical results. This issue is an incomplete fix for a previous vulnerability (CVE-2016-6887) where the vendor attempted to mitigate the issue by restricting modulus sizes rather than fixing the underlying calculation logic. A remote attacker can exploit these miscalculations to potentially recover or predict secret key material. The attack requires a high degree of complexity (AC:H) to successfully derive keys from the resulting mathematical errors.

Affected products

  • MatrixSSL MatrixSSL 3.8.6 and earlier

Timeline

  • 2016-08-01: disclosed: Vulnerability reported to vendor
  • 2016-10-15: advisory: Public disclosure by The Fuzzing Project
  • 2017-01-13: other: NVD publication date

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.