Undefined behavior when users supply invalid resource handles in TensorFlow
tensorflow
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| tensorflow PyPI |
|
|
| tensorflow-cpu PyPI |
|
tensorflow
| Product | Affected | Fixed in |
|---|---|---|
| tensorflow PyPI |
|
|
| tensorflow-cpu PyPI |
|
≥ 2.7.0 · < 2.7.2≥ 2.8.0 · < 2.8.1
|
| tensorflow-gpu PyPI |
|
|
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, multiple TensorFlow operations misbehave in eager mode when the resource handle provided to them is invalid. In graph mode, it would have been impossible to perform these API calls, but migration to TF 2.x eager mode opened up this vulnerability. If the resource handle is empty, then a reference is bound to a null pointer inside TensorFlow codebase (various codepaths). This is undefined behavior. Versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4 contain a patch for this issue.
From the CVE record · GitHub_M
Multiple TensorFlow operations in eager mode can bind a reference to a null pointer when given an empty resource handle, causing undefined behavior. An attacker who can supply such a handle could trigger this behavior; the input does not specify network access, authentication requirements, or user interaction.
Teams using affected PyPI tensorflow, tensorflow-cpu, or tensorflow-gpu versions below 2.6.4, from 2.7.0 to below 2.7.2, or from 2.8.0 to below 2.8.1 should check their installations.