CVE-2021-41253

Zydis is an x86/x86-64 disassembler library. Users of Zydis versions v3.2.0 and older that use the string functions provided in `zycore` in order to append untrusted user data to the formatter buffer within their custom formatter hooks can run into heap buffer overflows. Older versions of Zydis failed to properly initialize the string object within the formatter buffer, forgetting to initialize a few fields, leaving their value to chance. This could then in turn cause zycore functions like `ZyanStringAppend` to make incorrect calculations for the new target size, resulting in heap memory corruption. This does not affect the regular uncustomized Zydis formatter, because Zydis internally doesn't use the string functions in zycore that act upon these fields. However, because the zycore string functions are the intended way to work with the formatter buffer for users of the library that wish to extend the formatter, we still consider this to be a vulnerability in Zydis. This bug is patched starting in version 3.2.1. As a workaround, users may refrain from using zycore string functions in their formatter hooks until updating to a patched version.
Configurations

Configuration 1 (hide)

cpe:2.3:a:zyantific:zydis:*:*:*:*:*:*:*:*

History

24 Oct 2022, 16:07

Type Values Removed Values Added
CWE CWE-457
CWE-122
CWE-908

15 Nov 2021, 13:35

Type Values Removed Values Added
CPE cpe:2.3:a:zyantific:zydis:*:*:*:*:*:*:*:*
CVSS v2 : unknown
v3 : 5.9
v2 : 6.8
v3 : 8.1
References (MISC) https://huntr.dev/bounties/96b0a482-7041-45b1-9327-c6a4a8f32d3a - (MISC) https://huntr.dev/bounties/96b0a482-7041-45b1-9327-c6a4a8f32d3a - Exploit, Third Party Advisory
References (MISC) https://github.com/zyantific/zydis/commit/55dd08c210722aed81b38132f5fd4a04ec1943b5 - (MISC) https://github.com/zyantific/zydis/commit/55dd08c210722aed81b38132f5fd4a04ec1943b5 - Patch, Third Party Advisory
References (MISC) https://huntr.dev/bounties/d2536d7d-36ce-4723-928c-98d1ee039784 - (MISC) https://huntr.dev/bounties/d2536d7d-36ce-4723-928c-98d1ee039784 - Exploit, Patch, Third Party Advisory
References (CONFIRM) https://github.com/zyantific/zydis/security/advisories/GHSA-q42v-hv86-3m4g - (CONFIRM) https://github.com/zyantific/zydis/security/advisories/GHSA-q42v-hv86-3m4g - Third Party Advisory

08 Nov 2021, 22:15

Type Values Removed Values Added
New CVE

Information

Published : 2021-11-08 22:15

Updated : 2023-12-10 14:09


NVD link : CVE-2021-41253

Mitre link : CVE-2021-41253

CVE.ORG link : CVE-2021-41253


JSON object : View

Products Affected

zyantific

  • zydis
CWE
CWE-908

Use of Uninitialized Resource

CWE-122

Heap-based Buffer Overflow

CWE-457

Use of Uninitialized Variable