Bugzilla – Bug 1191331
VUL-0: CVE-2021-32765: hiredis: integer overflow if provided maliciously crafted or corrupted `RESP` `mult-bulk` protocol data
Last modified: 2023-01-02 14:58:43 UTC
CVE-2021-32765 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. References: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-32765 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-32765 https://github.com/redis/hiredis/security/advisories/GHSA-hfm9-39pp-55p2 https://github.com/redis/hiredis/commit/76a7b10005c70babee357a7d0f2becf28ec7ed1e https://wiki.sei.cmu.edu/confluence/display/c/MEM07-C.+Ensure+that+the+arguments+to+calloc%28%29%2C+when+multiplied%2C+do+not+wrap
https://build.opensuse.org/request/show/923651
https://build.opensuse.org/request/show/924120
Fixed in hiredis v1.0.2, which is available for openSUSE Tumbleweed. Leap 15.3 ships with hiredis 0.13.3, the fix is not available for that version of hiredis. The server:database repo contains hiredis 1.0.2 built for Leap 15.2. https://software.opensuse.org/package/hiredis
(In reply to Paul Fee from comment #3) > Leap 15.3 ships with hiredis 0.13.3, the fix is not available for that > version of hiredis. This is not in line with our security maintenance policy. Create a backport against 0.13.3. Do not close the issue but re-assign to security-team@suse.de when you are done. Set a needinfo request on them if unable. Here is the debian backport to help you get started: https://lists.debian.org/debian-lts-announce/2021/10/msg00007.html https://salsa.debian.org/lamby/pkg-hiredis/-/commit/e210141d449659042f00fad71e8bef7caea53c67
proposed maintenance update: https://build.opensuse.org/request/show/933345 Paul please review and accept the review on the request. Then re-assign bug to security-team@suse.de for processing.
This is an autogenerated message for OBS integration: This bug (1191331) was mentioned in https://build.opensuse.org/request/show/933347 15.2+Backports:SLE-15-SP3 / hiredis
https://build.opensuse.org/request/show/933347 Accepted. Assigning to security-team@suse.de as requested by Andreas.
openSUSE-SU-2021:1536-1: An update that fixes one vulnerability is now available. Category: security (moderate) Bug References: 1191331 CVE References: CVE-2021-32765 JIRA References: Sources used: openSUSE Leap 15.2 (src): hiredis-0.13.3-lp152.4.3.1 openSUSE Backports SLE-15-SP3 (src): hiredis-0.13.3-bp153.2.3.1
openSUSE-SU-2021:1550-1: An update that fixes one vulnerability is now available. Category: security (moderate) Bug References: 1191331 CVE References: CVE-2021-32765 JIRA References: Sources used: openSUSE Backports SLE-15-SP2 (src): hiredis-0.13.3-bp152.4.3.1
done