Unrated severityNVD Advisory· Published Oct 4, 2021· Updated Aug 3, 2024
Integer Overflow to Buffer Overflow in Hiredis
CVE-2021-32765
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 context option to a value small enough that no overflow is possible.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
7- osv-coords5 versionspkg:rpm/opensuse/hiredis&distro=openSUSE%20Leap%2015.2pkg:rpm/opensuse/hiredis&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/hiredis&distro=openSUSE%20Tumbleweedpkg:rpm/suse/hiredis&distro=SUSE%20Package%20Hub%2015%20SP2pkg:rpm/suse/hiredis&distro=SUSE%20Package%20Hub%2015%20SP3
< 0.13.3-bp153.2.3.1+ 4 more
- (no CPE)range: < 0.13.3-bp153.2.3.1
- (no CPE)range: < 0.13.3-bp153.2.3.1
- (no CPE)range: < 1.0.2-1.1
- (no CPE)range: < 0.13.3-bp152.4.3.1
- (no CPE)range: < 0.13.3-bp153.2.3.1
- redis/hiredisv5Range: < 1.0.1
Patches
Vulnerability mechanics
References
6- security.gentoo.org/glsa/202210-32mitrevendor-advisory
- lists.debian.org/debian-lts-announce/2021/10/msg00007.htmlmitremailing-list
- github.com/redis/hiredis/commit/76a7b10005c70babee357a7d0f2becf28ec7ed1emitre
- github.com/redis/hiredis/security/advisories/GHSA-hfm9-39pp-55p2mitre
- security.netapp.com/advisory/ntap-20211104-0003/mitre
- wiki.sei.cmu.edu/confluence/display/c/MEM07-C.+Ensure+that+the+arguments+to+calloc%28%29%2C+when+multiplied%2C+do+not+wrapmitre
News mentions
0No linked articles in our index yet.