Skip to content
MediumVulnerability

CVE-2022-35952: TensorFlow UnbatchGradOp crash from malformed id and batch_index arguments

Identifier
CVE-2022-35952
Published
Record updated
View JSON
Affected
  • tensorflow < 2.7.2, fixed in 2.7.2, released May 16, 2022, 124 days before disclosure
  • tensorflow >= 2.8.0, < 2.8.1, fixed in 2.8.1, released May 16, 2022, 124 days before disclosure
  • tensorflow >= 2.9.0, < 2.9.1, fixed in 2.9.1, released May 23, 2022, 117 days before disclosure
  • and 6 more
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.7%

Summary

TensorFlow's `UnbatchGradOp` function assumes its `id` argument is a scalar and expects `batch_index` to contain three times the number of elements given by `batch_index.dim_size(0)`. A nonscalar `id` or an incorrect `batch_index` triggers a `CHECK` failure that crashes the program.

Mitigation

Patched in GitHub commit 5f945fc6409a3c1e90d6970c9292f805f6e6ddf2. The fix will be included in TensorFlow 2.10.0, and the commit will be cherry-picked to TensorFlow 2.9.1, 2.8.1 and 2.7.2. There are no known workarounds.