CVE Vulnerabilities

CVE-2021-29477

Integer Overflow or Wraparound

Published: May 04, 2021 | Modified: Jun 04, 2022
CVSS 3.x
8.8
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
6.5 MEDIUM
AV:N/AC:L/Au:S/C:P/I:P/A:P
RedHat/V2
RedHat/V3
8.8 IMPORTANT
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Ubuntu

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. An integer overflow bug in Redis version 6.0 or newer could be exploited using the STRALGO LCS command to corrupt the heap and potentially result with remote code execution. The problem is fixed in version 6.2.3 and 6.0.13. An additional workaround to mitigate the problem without patching the redis-server executable is to use ACL configuration to prevent clients from using the STRALGO LCS command.

Weakness

The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.

Affected Software

Name Vendor Start Version End Version
Redis Redislabs 6.0.0 *
Redis Redislabs 6.2.0 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 7 RedHat rhacm2/management-ingress-rhel7:v2.3.0-36 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 7 RedHat rhacm2/memcached-exporter-rhel7:v2.3.0-21 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 7 RedHat rhacm2/thanos-rhel7:v2.3.0-36 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/acm-grafana-rhel8:v2.3.0-38 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/acm-must-gather-rhel8:v2.3.0-33 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/acm-operator-bundle:v2.3.0-197 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/agent-service-rhel8:v2.3.0-18 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/application-ui-rhel8:v2.3.0-120 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/assisted-installer-agent-rhel8:v2.3.0-21 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/assisted-installer-reporter-rhel8:v2.3.0-24 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/assisted-installer-rhel8:v2.3.0-22 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/cert-policy-controller-rhel8:v2.3.0-44 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/cluster-curator-controller-rhel8:v2.3.0-41 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/clusterlifecycle-state-metrics-rhel8:v2.3.0-43 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/config-policy-controller-rhel8:v2.3.0-55 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/console-api-rhel8:v2.3.0-63 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/console-rhel8:v2.3.0-127 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/discovery-rhel8-operator:v2.3.0-59 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/endpoint-monitoring-rhel8-operator:v2.3.0-49 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/governance-policy-propagator-rhel8:v2.3.0-43 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/governance-policy-spec-sync-rhel8:v2.3.0-38 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/governance-policy-status-sync-rhel8:v2.3.0-41 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/governance-policy-template-sync-rhel8:v2.3.0-37 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/grafana-dashboard-loader-rhel8:v2.3.0-40 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/grc-ui-api-rhel8:v2.3.0-58 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/grc-ui-rhel8:v2.3.0-100 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/iam-policy-controller-rhel8:v2.3.0-40 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/insights-client-rhel8:v2.3.0-49 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/insights-metrics-rhel8:v2.3.0-20 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/klusterlet-addon-controller-rhel8:v2.3.0-39 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/klusterlet-addon-rhel8-operator:v2.3.0-39 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/klusterlet-operator-bundle:v2.3.0-243 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/kui-web-terminal-rhel8:v2.3.0-51 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/managedcluster-import-controller-rhel8:v2.3.0-46 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/memcached-rhel8:v2.3.0-20 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/metrics-collector-rhel8:v2.3.0-43 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/multicloud-manager-rhel8:v2.3.0-69 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/multiclusterhub-repo-rhel8:v2.3.0-95 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/multiclusterhub-rhel8:v2.3.0-106 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/multicluster-observability-rhel8-operator:v2.3.0-107 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/multicluster-operators-application-rhel8:v2.3.0-39 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/multicluster-operators-channel-rhel8:v2.3.0-40 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/multicluster-operators-deployable-rhel8:v2.3.0-35 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/multicluster-operators-placementrule-rhel8:v2.3.0-53 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/multicluster-operators-subscription-release-rhel8:v2.3.0-43 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/multicluster-operators-subscription-rhel8:v2.3.0-66 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/observatorium-rhel8:v2.3.0-34 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/observatorium-rhel8-operator:v2.3.0-47 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/openshift-hive-rhel7:v2.3.0-30 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/openshift-hive-rhel8:v2.3.0-30 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/placement-rhel8:v2.3.0-17 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/prometheus-alertmanager-rhel8:v2.3.0-25 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/provider-credential-controller-rhel8:v2.3.0-28 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/rbac-query-proxy-rhel8:v2.3.0-41 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/redisgraph-tls-rhel8:v2.3.0-29 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/registration-rhel8:v2.3.0-49 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/registration-rhel8-operator:v2.3.0-45 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/search-aggregator-rhel8:v2.3.0-41 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/search-api-rhel8:v2.3.0-46 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/search-collector-rhel8:v2.3.0-52 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/search-rhel8:v2.3.0-45 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/search-ui-rhel8:v2.3.0-59 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/submariner-addon-rhel8:v2.3.0-53 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/thanos-receive-controller-rhel8:v2.3.0-25 *
Red Hat Advanced Cluster Management for Kubernetes 2.3 for RHEL 8 RedHat rhacm2/work-rhel8:v2.3.0-40 *
Red Hat Enterprise Linux 8 RedHat redis:6-8040020210512055424.522a0ee4 *
Redis Ubuntu groovy *
Redis Ubuntu hirsute *
Redis Ubuntu trusty *
Redis Ubuntu upstream *
Redis Ubuntu xenial *

Potential Mitigations

  • Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • If possible, choose a language or compiler that performs automatic bounds checking.
  • Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • Use libraries or frameworks that make it easier to handle numbers without unexpected consequences.
  • Examples include safe integer handling packages such as SafeInt (C++) or IntegerLib (C or C++). [REF-106]
  • Perform input validation on any numeric input by ensuring that it is within the expected range. Enforce that the input meets both the minimum and maximum requirements for the expected range.
  • Use unsigned integers where possible. This makes it easier to perform validation for integer overflows. When signed integers are required, ensure that the range check includes minimum values as well as maximum values.
  • Understand the programming language’s underlying representation and how it interacts with numeric calculation (CWE-681). Pay close attention to byte size discrepancies, precision, signed/unsigned distinctions, truncation, conversion and casting between types, “not-a-number” calculations, and how the language handles numbers that are too large or too small for its underlying representation. [REF-7]
  • Also be careful to account for 32-bit, 64-bit, and other potential differences that may affect the numeric representation.

References