CVE-2021-29596: Division by zero in TFLite's implementation of `EmbeddingLookup`
(updated )
The implementation of the EmbeddingLookup
TFLite operator is vulnerable to a division by zero error:
const int row_size = SizeOfDimension(value, 0);
const int row_bytes = value->bytes / row_size;
An attacker can craft a model such that the first dimension of the value
input is 0.
References
- github.com/advisories/GHSA-4vrf-ff7v-hpgr
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2021-524.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2021-722.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2021-233.yaml
- github.com/tensorflow/tensorflow
- github.com/tensorflow/tensorflow/blob/e4b29809543b250bc9b19678ec4776299dd569ba/tensorflow/lite/kernels/embedding_lookup.cc
- github.com/tensorflow/tensorflow/commit/f61c57bd425878be108ec787f4d96390579fb83e
- github.com/tensorflow/tensorflow/security/advisories/GHSA-4vrf-ff7v-hpgr
- nvd.nist.gov/vuln/detail/CVE-2021-29596
Detect and mitigate CVE-2021-29596 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 →