7.5 CVE-2022-3786

Buffer Overflow Patch
 

A buffer overrun can be triggered in X.509 certificate verification, specifically in name constraint checking. Note that this occurs after certificate chain signature verification and requires either a CA to have signed a malicious certificate or for an application to continue certificate verification despite failure to construct a path to a trusted issuer. An attacker can craft a malicious email address in a certificate to overflow an arbitrary number of bytes containing the `.' character (decimal 46) on the stack. This buffer overflow could result in a crash (causing a denial of service). In a TLS client, this can be triggered by connecting to a malicious server. In a TLS server, this can be triggered if the server requests client authentication and a malicious client connects.
https://nvd.nist.gov/vuln/detail/CVE-2022-3786

Categories

CWE-120 : Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer. This term was frequently used by vulnerability researchers during approximately 1995 to 2005 to differentiate buffer copies without length checks (which had been known about for decades) from other emerging weaknesses that still involved invalid accesses of buffers, as vulnerability researchers began to develop advanced exploitation techniques. This weakness can be detected using dynamic tools and techniques that interact with the software using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The software's operation may slow down, but it should not become unstable, crash, or generate incorrect results. Manual analysis can be useful for finding this weakness, but it might not achieve desired code coverage within limited time constraints. This becomes difficult for weaknesses that must be considered for all inputs, since the attack surface can be too large. For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server. Most mitigating technologies at the compiler or OS level to date address only a subset of buffer overflow problems and rarely provide complete protection against even that subset. It is good practice to implement strategies to increase the workload of an attacker, such as leaving the attacker to guess an unknown value that changes every program execution. Replace unbounded copy functions with analogous functions that support length arguments, such as strcpy with strncpy. Create these if they are not available. When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs. Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations. buffer overflow using command with long argument buffer overflow in local program using long environment variable buffer overflow in comment characters, when product increments a counter for a ">" but does not decrement for "<" By replacing a valid cookie value with an extremely long string of characters, an attacker may overflow the application's buffers. By replacing a valid cookie value with an extremely long string of characters, an attacker may overflow the application's buffers.

References


 

CPE

cpe start end
Configuration 1
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* >= 3.0.0 < 3.0.7
Configuration 2
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*
Configuration 3
cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:* >= 18.0.0 < 18.11.0
cpe:2.3:a:nodejs:node.js:18.12.0:*:*:*:lts:*:*:*
cpe:2.3:a:nodejs:node.js:19.0.0:*:*:*:-:*:*:*


REMEDIATION


Patch

Url
https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=c42165b5706e42f6...
https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=c42165b5706e42f6...


EXPLOITS


Exploit-db.com

id description date
No known exploits

POC Github

Url
No known exploits

Other Nist (github, ...)

Url
No known exploits


CAPEC


Common Attack Pattern Enumerations and Classifications

id description severity
10 Buffer Overflow via Environment Variables
High
100 Overflow Buffers
Very High
14 Client-side Injection-induced Buffer Overflow
High
24 Filter Failure through Buffer Overflow
High
42 MIME Conversion
High
44 Overflow Binary Resource File
Very High
45 Buffer Overflow via Symbolic Links
High
46 Overflow Variables and Tags
High
47 Buffer Overflow via Parameter Expansion
High
67 String Format Overflow in syslog()
Very High
8 Buffer Overflow in an API Call
High
9 Buffer Overflow in Local Command-Line Utilities
High
92 Forced Integer Overflow
High