Skip to main content

Access of Resource Using Incompatible Type ('Type Confusion')


Severity Medium
Score 5.5/10


TensorFlow is an open source platform for machine learning. Versions prior to 2.6.4, 2.7.x prior to 2.7.2, 2.8.x prior to 2.8.1, and 2.9.x prior to 2.9.0, the macros that TensorFlow uses for writing assertions (e.g., `CHECK_LT`, `CHECK_GT`, etc.) have an incorrect logic when comparing `size_t` and `int` values. Due to type conversion rules, several of the macros would trigger incorrectly. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.

  • LOW
  • NONE
  • NONE
  • LOW
  • NONE
  • HIGH

CWE-843 - Access of Resource Using Incompatible Type ('Type Confusion')

The program allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.

Advisory Timeline

  • Published