`CHECK` fail in `AudioSummaryV2` in TensorFlow
Description
TensorFlow is an open source platform for machine learning. When AudioSummaryV2 receives an input sample_rate with more than one element, it gives a CHECK fails that can be used to trigger a denial of service attack. We have patched the issue in GitHub commit bf6b45244992e2ee543c258e519489659c99fb7f. The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range. There are no known workarounds for this issue.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
tensorflowPyPI | < 2.7.2 | 2.7.2 |
tensorflowPyPI | >= 2.8.0, < 2.8.1 | 2.8.1 |
tensorflowPyPI | >= 2.9.0, < 2.9.1 | 2.9.1 |
tensorflow-cpuPyPI | < 2.7.2 | 2.7.2 |
tensorflow-cpuPyPI | >= 2.8.0, < 2.8.1 | 2.8.1 |
tensorflow-cpuPyPI | >= 2.9.0, < 2.9.1 | 2.9.1 |
tensorflow-gpuPyPI | < 2.7.2 | 2.7.2 |
tensorflow-gpuPyPI | >= 2.8.0, < 2.8.1 | 2.8.1 |
tensorflow-gpuPyPI | >= 2.9.0, < 2.9.1 | 2.9.1 |
Affected products
1- Range: < 2.7.2
Patches
1bf6b45244992Fix tf.raw_ops.AudioSummaryV2 vulnerability with invalid `sample_rate`.
2 files changed · +11 −0
tensorflow/core/kernels/summary_audio_op.cc+5 −0 modified@@ -49,6 +49,11 @@ class SummaryAudioOp : public OpKernel { float sample_rate = sample_rate_attr_; if (!has_sample_rate_attr_) { const Tensor& sample_rate_tensor = c->input(2); + OP_REQUIRES(c, + sample_rate_tensor.IsAligned() && + sample_rate_tensor.NumElements() == 1, + errors::InvalidArgument( + "sample_rate must be rank-0 or contain a single value")); sample_rate = sample_rate_tensor.scalar<float>()(); } OP_REQUIRES(c, sample_rate > 0.0f,
tensorflow/python/summary/summary_test.py+6 −0 modified@@ -23,6 +23,7 @@ from tensorflow.core.framework import summary_pb2 from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes +from tensorflow.python.framework import errors from tensorflow.python.framework import meta_graph from tensorflow.python.framework import ops from tensorflow.python.framework import test_util @@ -183,6 +184,11 @@ def testAudioSummaryWithFamily(self): 'family/outer/family/inner/audio/{}'.format(i) for i in range(3)) self.assertEqual(tags, expected) + def testAudioSummaryWithInvalidSampleRate(self): + with self.assertRaises(errors.InvalidArgumentError): + invalid_sample_rate = [22000.0, 22000.0] + self.evaluate(summary_lib.audio('', [[1.0]], invalid_sample_rate)) + @test_util.run_deprecated_v1 def testTextSummary(self): with self.cached_session():
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/advisories/GHSA-g9h5-vr8m-x2h4ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-35995ghsaADVISORY
- github.com/tensorflow/tensorflow/commit/bf6b45244992e2ee543c258e519489659c99fb7fghsax_refsource_MISCWEB
- github.com/tensorflow/tensorflow/releases/tag/v2.10.0ghsaWEB
- github.com/tensorflow/tensorflow/security/advisories/GHSA-g9h5-vr8m-x2h4ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.