CVE-2021-32765 Integer Overflow to Buffer Overflow in Hiredis
An integer overflow in Hiredis when parsing multi-bulk replies can lead to buffer overflow, allowing attackers to execute code or cause denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-32765?
CVE-2021-32765 is a high-severity vulnerability in Debian Debian Linux, published on 4 Oct 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
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 `SIZE_MAX`. 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](https://github.com/redis/hiredis#reader-max-array-elements) context option to a value small enough that no overflow is possible.
Which versions are affected by CVE-2021-32765?
It affects 3 products.
Linux distribution packages (5)
hiredis SUSE:Package Hub 15 SP2 | All versions | 0.13.3-bp152.4.3.1 |
hiredis SUSE:Package Hub 15 SP3 | All versions | 0.13.3-bp153.2.3.1 |
hiredis openSUSE:Leap 15.2 | All versions | 0.13.3-bp153.2.3.1 |
hiredis openSUSE:Leap 15.3 | All versions | 0.13.3-bp153.2.3.1 |
hiredis openSUSE:Tumbleweed | All versions | 1.0.2-1.1 |
Products include Debian Debian Linux, Netapp Management Services for Element Software and Netapp Hci, Redis Hiredis.
How do I fix CVE-2021-32765?
Upgrade to a fixed version.
Is CVE-2021-32765 being exploited?
There is no known exploitation of CVE-2021-32765 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as DEBIAN-CVE-2021-32765, GHSA-hfm9-39pp-55p2, MGASA-2021-0562, OESA-2021-1390, UBUNTU-CVE-2021-32765, openSUSE-SU-2021:1536-1 and 2 more.