Buffer overflow in OpenSSL exploited when validating X.509 certificates

A corrective release of the OpenSSL 3.0.7 cryptographic library has been published, fixing two vulnerabilities. Both issues are caused by a buffer overflow in the code for validating the email address field in X.509 certificates and could potentially lead to code execution when processing a specially crafted certificate. At the time of the publication of the fix, the OpenSSL developers had not recorded the existence of a working exploit that could lead to the execution of the attacker's code.

Although the pre-published announcement of the new release mentioned the presence of a critical issue, in fact, in the released update, the status of the vulnerability was reduced to a dangerous, but not a critical vulnerability. In accordance with the rules adopted in the project, the severity level is reduced in case of a problem in atypical configurations or in case of a low probability of exploiting a vulnerability in practice.

In this case, the severity level was reduced because a detailed analysis of the vulnerability by several organizations concluded that the ability to execute code during exploitation is blocked by stack overflow protection mechanisms used in many platforms. Furthermore, the stack overflow protection mechanism used in some distributions Linux The grid layout causes the out-of-bounds 4 bytes to overlap the next buffer on the stack, which isn't yet in use. However, it's possible that there are platforms where this could be exploited to execute code.

Issues identified:

  • CVE-2022-3602 is a vulnerability, initially rated as critical, that causes a 4-byte buffer overflow when validating a specially crafted email address field in an X.509 certificate. In a TLS client, the vulnerability can be exploited when connecting to server, controlled by the attacker. On a TLS server, the vulnerability can be exploited if client authentication is enabled using certificates. The vulnerability manifests itself after the certificate-related chain of trust has been verified, meaning the attack requires the certification authority to validate the attacker's malicious certificate.
  • CVE-2022-3786 is another vector of exploitation of the CVE-2022-3602 vulnerability identified during the analysis of the problem. The differences come down to the possibility of a buffer overflow on the stack by an arbitrary number of bytes containing the character "." (i.e. the attacker has no control over the content of the overflow and the problem can only be used to cause the application to crash).

The vulnerabilities appear only in the OpenSSL 3.0.x branch (the bug appeared in the Unicode conversion code (punycode) added to the 3.0.x branch). OpenSSL 1.1.1 releases, as well as LibreSSL and BoringSSL forks from OpenSSL, are not affected. At the same time, an update to OpenSSL 1.1.1s was generated, which contains only non-security-related bug fixes.

The OpenSSL 3.0 branch is used in distributions such as Ubuntu 22.04 CentOS Stream 9, RHEL 9, OpenMandriva 4.2, Gentoo, Fedora 36, Debian Testing/Unstable. Users of these systems are advised to install updates as soon as possible (Debian, Ubuntu, RHEL, SUSE/openSUSE, Fedora, Arch). In SUSE Linux Enterprise 15 SP4 and openSUSE Leap 15.4 packages with OpenSSL 3.0 are available optionally, system packages use the 1.1.1 branch. OpenSSL 1.x branches remain Debian 11, Arch Linux, Void Linux, Ubuntu April 20.04, Slackware, ALT Linux, RHEL 8, OpenWrt, Alpine Linux 3.16 and FreeBSD.

Source: opennet.ru

Buy reliable hosting for sites with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster