Skip to main content

CVE-2022-29203: CWE-190: Integer Overflow or Wraparound in tensorflow tensorflow

Medium
Published: Fri May 20 2022 (05/20/2022, 22:50:11 UTC)
Source: CVE
Vendor/Project: tensorflow
Product: tensorflow

Description

TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, the implementation of `tf.raw_ops.SpaceToBatchND` (in all backends such as XLA and handwritten kernels) is vulnerable to an integer overflow: The result of this integer overflow is used to allocate the output tensor, hence we get a denial of service via a `CHECK`-failure (assertion failure), as in TFSA-2021-198. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.

AI-Powered Analysis

AILast updated: 06/22/2025, 01:21:58 UTC

Technical Analysis

CVE-2022-29203 is a medium-severity vulnerability affecting TensorFlow, an open-source machine learning platform widely used for developing and deploying machine learning models. The vulnerability arises from an integer overflow or wraparound issue (CWE-190) in the implementation of the `tf.raw_ops.SpaceToBatchND` operation across all TensorFlow backends, including XLA and handwritten kernels. Specifically, the integer overflow occurs during the calculation of the output tensor size, which is then used to allocate memory for the output tensor. When the overflow happens, it leads to an incorrect allocation size, triggering a CHECK failure (assertion failure) within TensorFlow. This failure results in a denial of service (DoS) condition, causing the affected TensorFlow process to crash or terminate unexpectedly. The vulnerability affects TensorFlow versions prior to 2.6.4, as well as certain release candidate versions before 2.7.2, 2.8.1, and 2.9.0, which have since been patched. No known exploits are currently reported in the wild. The vulnerability does not appear to allow for arbitrary code execution or data leakage but can disrupt machine learning workflows by causing service interruptions. Exploitation requires the ability to invoke the vulnerable TensorFlow operation with crafted inputs that trigger the integer overflow, which may be feasible in environments where untrusted or user-supplied data is processed by TensorFlow models. The vulnerability is mitigated by upgrading to patched TensorFlow versions 2.6.4, 2.7.2, 2.8.1, or 2.9.0 and later.

Potential Impact

For European organizations, the primary impact of this vulnerability is operational disruption due to denial of service in machine learning systems that rely on vulnerable TensorFlow versions. Organizations using TensorFlow in production environments for critical applications such as financial modeling, healthcare diagnostics, autonomous systems, or industrial automation may experience unexpected crashes or service outages, potentially affecting business continuity and service availability. Although the vulnerability does not directly compromise confidentiality or integrity, the disruption of machine learning pipelines can delay decision-making processes and degrade the quality of services dependent on AI models. Additionally, organizations that expose TensorFlow-based services to external users or process untrusted inputs may face increased risk of targeted DoS attacks exploiting this vulnerability. The impact is heightened in sectors with stringent uptime requirements or regulatory obligations for service availability. Given TensorFlow's widespread adoption in research institutions and enterprises across Europe, the vulnerability could affect a broad range of industries, including finance, healthcare, automotive, and telecommunications.

Mitigation Recommendations

1. Upgrade TensorFlow to a patched version: Organizations should promptly update TensorFlow to version 2.6.4 or later, ensuring that the specific patched versions 2.7.2, 2.8.1, or 2.9.0 and beyond are deployed. 2. Input validation and sanitization: Implement strict validation of inputs to TensorFlow models, especially for operations invoking `SpaceToBatchND`, to prevent maliciously crafted inputs that could trigger the integer overflow. 3. Isolate machine learning workloads: Run TensorFlow workloads in isolated environments or containers with resource limits to contain potential crashes and prevent cascading failures in critical systems. 4. Monitor and alert: Deploy monitoring tools to detect abnormal TensorFlow process terminations or assertion failures, enabling rapid incident response. 5. Review usage of vulnerable operations: Audit machine learning codebases to identify usage of `SpaceToBatchND` and assess the risk exposure, considering alternative implementations or workarounds if immediate patching is not feasible. 6. Restrict access: Limit access to TensorFlow model serving endpoints to trusted users and networks to reduce the attack surface. 7. Maintain patch management processes: Establish procedures to track and apply TensorFlow security updates promptly, including release candidates and minor versions.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-04-13T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9848c4522896dcbf652f

Added to database: 5/21/2025, 9:09:28 AM

Last enriched: 6/22/2025, 1:21:58 AM

Last updated: 8/15/2025, 7:15:00 AM

Views: 14

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats