CVE-2021-21309
Integer overflow on 32-bit systems
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
Redis is an open-source, in-memory database that persists on disk. In affected versions of Redis an integer overflow bug in 32-bit Redis version 4.0 or newer could be exploited to corrupt the heap and potentially result with remote code execution. Redis 4.0 or newer uses a configurable limit for the maximum supported bulk input size. By default, it is 512MB which is a safe value for all platforms. If the limit is significantly increased, receiving a large request from a client may trigger several integer overflow scenarios, which would result with buffer overflow and heap corruption. We believe this could in certain conditions be exploited for remote code execution. By default, authenticated Redis users have access to all configuration parameters and can therefore use the “CONFIG SET proto-max-bulk-len” to change the safe default, making the system vulnerable. **This problem only affects 32-bit Redis (on a 32-bit system, or as a 32-bit executable running on a 64-bit system).** The problem is fixed in version 6.2, and the fix is back ported to 6.0.11 and 5.0.11. Make sure you use one of these versions if you are running 32-bit Redis. An additional workaround to mitigate the problem without patching the redis-server executable is to prevent clients from directly executing `CONFIG SET`: Using Redis 6.0 or newer, ACL configuration can be used to block the command. Using older versions, the `rename-command` configuration directive can be used to rename the command to a random string unknown to users, rendering it inaccessible. Please note that this workaround may have an additional impact on users or operational systems that expect `CONFIG SET` to behave in certain ways.
Redis es una base de datos en memoria de código abierto que persiste en el disco. En las versiones afectadas de Redis, un error de desbordamiento de enteros en Redis de 32 bits versión 4.0 o más reciente podría ser explotada para corromper la pila y potencialmente resultar en una ejecución de código remota. Redis versiones 4.0 o posteriores, usa un límite configurable para el tamaño máximo de la entrada masiva admitida. Por defecto, es de 512 MB, que es un valor seguro para todas las plataformas. Si el límite aumenta significativamente, recibir una petición grande de un cliente puede desencadenar varios escenarios de desbordamiento de enteros, que podría resultar en un desbordamiento del búfer y una corrupción de la pila. Creemos que, en determinadas condiciones, esta podría ser explotada para una ejecución de código remota. Por defecto, usuarios de Redis autenticados poseen acceso a todos los parámetros de configuración y, por lo tanto, pueden usar "CONFIG SET proto-max-bulk-len" para cambiar el valor predeterminado seguro, haciendo que el sistema sea vulnerable.** Este problema solo afecta a Redis de 32 bits (en un sistema de 32 bits o como un ejecutable de 32 bits que se ejecuta en un sistema de 64 bits). ** El problema se corrigió en la versión 6.2 y la solución se ha modificado a versiones 6.0.11 y 5.0.11. Asegúrese de usar una de estas versiones si está ejecutando Redis de 32 bits. Una solución alternativa para mitigar el problema sin parchear el ejecutable de redis-server es impedir que los clientes ejecuten directamente `CONFIG SET`: Con Redis versiones 6.0 o más recientes, la configuración de ACL puede ser usada para bloquear el comando. Utilizando versiones anteriores, la directiva de configuración "rename-command" puede ser usada para cambiar el nombre del comando a una cadena aleatoria desconocida para usuarios, haciéndolo inaccesible. Tome en cuenta que esta solución puede tener un impacto adicional en los usuarios o los sistemas operativos que esperan que "CONFIG SET" se comporte de determinadas formas
An integer overflow was found in Redis. Redis 4.0 or newer uses a configurable limit for the maximum supported bulk input size. The default size is 512MB which is a safe value for all platforms. Authenticated Redis users could increase the bulk input size by changing the "proto-max-bulk-len" configuration parameter, leading to heap corruption and potentially remote code execution.
Red Hat Advanced Cluster Management for Kubernetes 2.3.0 images Red Hat Advanced Cluster Management for Kubernetes provides the capabilities to address common challenges that administrators and site reliability engineers face as they work across a range of public and private cloud environments. Clusters and applications are all visible and managed from a single console—with security policy built in. This advisory contains the container images for Red Hat Advanced Cluster Management for Kubernetes, which fix several bugs and security issues. Issues addressed include code execution, cross site scripting, denial of service, integer overflow, and null pointer vulnerabilities.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2020-12-22 CVE Reserved
- 2021-02-26 CVE Published
- 2024-08-03 CVE Updated
- 2025-03-30 EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
- CWE-190: Integer Overflow or Wraparound
CAPEC
References (6)
URL | Tag | Source |
---|---|---|
https://github.com/redis/redis/security/advisories/GHSA-hgj8-vff2-7cjf | Third Party Advisory |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://github.com/redis/redis/commit/c992857618db99776917f10bf4f2345a5fdc78b0 | 2022-10-19 | |
https://github.com/redis/redis/pull/8522 | 2022-10-19 |
URL | Date | SRC |
---|---|---|
https://security.gentoo.org/glsa/202103-02 | 2022-10-19 | |
https://access.redhat.com/security/cve/CVE-2021-21309 | 2021-08-06 | |
https://bugzilla.redhat.com/show_bug.cgi?id=1932634 | 2021-08-06 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Redislabs Search vendor "Redislabs" | Redis Search vendor "Redislabs" for product "Redis" | >= 4.0 < 5.0.11 Search vendor "Redislabs" for product "Redis" and version " >= 4.0 < 5.0.11" | - |
Affected
| ||||||
Redislabs Search vendor "Redislabs" | Redis Search vendor "Redislabs" for product "Redis" | >= 6.0.0 < 6.0.11 Search vendor "Redislabs" for product "Redis" and version " >= 6.0.0 < 6.0.11" | - |
Affected
|