Executive brief
OpenSSL, a widely used security library for encrypting internet communications, contains a flaw in how it handles specific types of mathematical curves used in cryptography. If an application uses 'exotic' or non-standard curve settings provided by an untrusted source, it could lead to a system crash or potentially allow an attacker to execute unauthorized code. However, most common uses of OpenSSL, such as standard web browsing and digital certificates (X.509), are not affected because they use standard settings that prevent this error.
Technical details
A vulnerability exists in OpenSSL's low-level GF(2^m) elliptic curve APIs, specifically within the BN_GF2m_poly2arr() and BN_GF2m_mod_arr() functions. The root cause is a failure to verify a precondition that the field polynomial must have a non-zero constant term when using explicit curve parameters. An attacker providing 'exotic' explicit binary curve parameters with an invalid polynomial (where the constant term is zero) can trigger out-of-bounds memory reads or writes. While this could theoretically lead to remote code execution or a denial-of-service (crash), the impact is limited because standard X9.62 encodings used in X.509 certificates and common TLS protocols cannot represent the problematic values. The fix involves hardening BN_GF2m_poly2arr() to reject polynomials with a zero constant term or those exceeding maximum field bit limits.
Affected products
- OpenSSL Foundation OpenSSL 3.3, 3.2, 3.1, 3.0, 1.1.1, 1.0.2
Timeline
- 2024-10-16: advisory: OpenSSL security advisory published
- 2024-10-16: patched: Fixes committed to OpenSSL repositories
References
- https://github.com/openssl/openssl/commit/72ae83ad214d2eef262461365a1975707f862712
- https://github.com/openssl/openssl/commit/bc7e04d7c8d509fb78fc0e285aa948fb0da04700
- https://github.com/openssl/openssl/commit/c0d3e4d32d2805f49bec30547f225bc4d092e1f4
- https://github.com/openssl/openssl/commit/fdf6723362ca51bd883295efe206cb5b1cfa5154
- https://github.openssl.org/openssl/extended-releases/commit/8efc0cbaa8ebba8e116f7b81a876a4123594d86a
- https://github.openssl.org/openssl/extended-releases/commit/9d576994cec2b7aa37a91740ea7e680810957e41
- https://openssl-library.org/news/secadv/20241016.txt