Vulnerability Details : CVE-2023-40022
Rizin is a UNIX-like reverse engineering framework and command-line toolset. Versions 0.6.0 and prior are vulnerable to integer overflow in `consume_count` of `src/gnu_v2/cplus-dem.c`. The overflow check is valid logic but, is missing the modulus if the block once compiled. The compiler sees this block as unreachable code since the prior statement is multiplication by 10 and fails to consider overflow assuming the count will always be a multiple of 10. Rizin version 0.6.1 contains a fix for the issue. A temporary workaround would be disabling C++ demangling using the configuration option `bin.demangle=false`.
Vulnerability category: Overflow
Products affected by CVE-2023-40022
- cpe:2.3:a:rizin:rizin:*:*:*:*:*:*:*:*
Exploit prediction scoring system (EPSS) score for CVE-2023-40022
0.07%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 33 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2023-40022
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
7.8
|
HIGH | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
1.8
|
5.9
|
NIST | |
7.8
|
HIGH | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
1.8
|
5.9
|
GitHub, Inc. |
CWE ids for CVE-2023-40022
-
The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.Assigned by: security-advisories@github.com (Primary)
References for CVE-2023-40022
-
https://github.com/rizinorg/rz-libdemangle/commit/51d016750e704b27ab8ace23c0f72acabca67018
[gnuv2] Fix multiplication overflow check due compiler optimizations … · rizinorg/rz-libdemangle@51d0167 · GitHubPatch
-
https://github.com/rizinorg/rizin/pull/3753
Update rz-libdemangle by XVilka · Pull Request #3753 · rizinorg/rizin · GitHubPatch
-
https://github.com/rizinorg/rizin/security/advisories/GHSA-92h6-wwc2-53cq
Integer Overflow in C++ demangler logic · Advisory · rizinorg/rizin · GitHubPatch;Vendor Advisory
-
https://github.com/rizinorg/rz-libdemangle/blob/main/src/gnu_v2/cplus-dem.c#L419
rz-libdemangle/src/gnu_v2/cplus-dem.c at main · rizinorg/rz-libdemangle · GitHubProduct
-
https://github.com/rizinorg/rz-libdemangle/pull/54
[gnuv2] Fix multiplication overflow check due compiler optimizations by wargio · Pull Request #54 · rizinorg/rz-libdemangle · GitHubPatch
Jump to