CVE-2021-32765: Integer Overflow to Buffer Overflow in Hiredis
Hiredis is a minimalistic C client library for the Redis database. In affected versions Hiredis is vulnurable to integer overflow if provided maliciously crafted or corrupted RESP mult-bulk protocol data. When parsing multi-bulk (array-like) replies, hiredis fails to check if count sizeof(redisReply) can be represented in SIZEMAX. If it can not, and the calloc() call doesn't itself make this check, it would result in a short allocation and subsequent buffer overflow. Users of hiredis who are unable to update may set the maxelements context option to a value small enough that no overflow is possible.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is CVE-2021-32765?
CVE-2021-32765 is a vulnerability in the Hiredis C client library for Redis that allows for integer overflow when parsing multi-bulk protocol data.
How can this vulnerability be exploited?
This vulnerability can be exploited by providing maliciously crafted or corrupted multi-bulk protocol data to the Hiredis library, triggering an integer overflow.
What is the severity of CVE-2021-32765?
The severity of CVE-2021-32765 is rated as high, with a CVSS score of 8.8.
Which software versions are affected by CVE-2021-32765?
Versions up to and excluding Hiredis 1.0.1, Debian Linux 9.0, and Netapp Management Services for Element Software and Netapp HCI are affected by CVE-2021-32765.
How can I fix CVE-2021-32765?
To fix CVE-2021-32765, it is recommended to update to a patched version of the affected software or apply the necessary security patches.