CVE-2021-29602: Division by zero in TFLite's implementation of `DepthwiseConv`
(updated )
The implementation of the DepthwiseConv
TFLite operator is vulnerable to a division by zero error:
int num_input_channels = SizeOfDimension(input, 3);
TF_LITE_ENSURE_EQ(context, num_filter_channels % num_input_channels, 0);
An attacker can craft a model such that input
’s fourth dimension would be 0.
References
- github.com/advisories/GHSA-rf3h-xgv5-2q39
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2021-530.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2021-728.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2021-239.yaml
- github.com/tensorflow/tensorflow
- github.com/tensorflow/tensorflow/blob/1a8e885b864c818198a5b2c0cbbeca5a1e833bc8/tensorflow/lite/kernels/depthwise_conv.cc
- github.com/tensorflow/tensorflow/commit/cbda3c6b2dbbd3fbdc482ff8c0170a78ec2e97d0
- github.com/tensorflow/tensorflow/security/advisories/GHSA-rf3h-xgv5-2q39
- nvd.nist.gov/vuln/detail/CVE-2021-29602
Detect and mitigate CVE-2021-29602 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →