CVE-2022-29205 in TensorFlowinfo

Summary

by MITRE • 05/21/2022

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, there is a potential for segfault / denial of service in TensorFlow by calling `tf.compat.v1.*` ops which don't yet have support for quantized types, which was added after migration to TensorFlow 2.x. In these scenarios, since the kernel is missing, a `nullptr` value is passed to `ParseDimensionValue` for the `py_value` argument. Then, this is dereferenced, resulting in segfault. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 05/27/2022

This vulnerability affects tensorflow versions prior to 2.9.0, 2.8.1, 2.7.2, and 2.6.4, representing a critical denial of service condition that can result in segmentation faults during runtime. The issue specifically targets the compatibility layer functions prefixed with tf.compat.v1.* which are designed to maintain backward compatibility when migrating from tensorflow 1.x to 2.x. The root cause stems from incomplete migration of quantized type support within the tensorflow 2.x framework, creating a scenario where legacy v1 compatibility operations fail when encountering quantized tensors.

The technical flaw manifests when tensorflow attempts to parse dimension values for quantized types in operations that lack proper kernel support. During the execution of tf.compat.v1.* operations, the system encounters a null pointer dereference when the py_value argument is passed to ParseDimensionValue function. This occurs because the kernel implementation for quantized types was not fully migrated to tensorflow 2.x, leaving the system in a state where nullptr values are processed without proper validation. The dereferencing of this null pointer triggers immediate segmentation faults, causing the application to crash and resulting in denial of service conditions for any processes relying on affected tensorflow operations.

The operational impact of this vulnerability extends beyond simple application crashes, as it affects systems that depend on tensorflow's backward compatibility layer for legacy code migration. Organizations running tensorflow applications may experience unexpected service interruptions when processing quantized tensors through compatibility functions, potentially affecting machine learning pipelines, model inference systems, and automated data processing workflows. The vulnerability particularly impacts environments where tensorflow 2.x is being gradually adopted alongside legacy 1.x codebases, creating a dangerous intersection point where compatibility functions fail under specific tensor type conditions.

Mitigation strategies should prioritize immediate upgrade to tensorflow versions 2.9.0, 2.8.1, 2.7.2, or 2.6.4 which contain the necessary patches for this issue. System administrators should conduct comprehensive testing of all tensorflow 2.x migration paths to identify potential compatibility scenarios that might trigger similar issues. Additionally, implementing runtime safeguards such as input validation for tensor types and proper error handling for kernel lookup failures can provide additional protection layers. Organizations should also consider monitoring for unusual segmentation fault patterns in tensorflow processes, as this vulnerability may indicate broader compatibility issues during the tensorflow 2.x transition phase. This vulnerability aligns with CWE-476 which addresses null pointer dereference issues, and represents a specific implementation gap in the ATT&CK framework's software exploitation techniques where denial of service is achieved through improper memory management during compatibility layer operations.

Responsible

GitHub, Inc.

Reservation

04/13/2022

Disclosure

05/21/2022

Moderation

accepted

CPE

ready

EPSS

0.00317

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!