CVE-2021-37680: Division by zero in TFLite
(updated )
The implementation of fully connected layers in TFLite is vulnerable to a division by zero error:
const int batch_size = input_size / filter->dims->data[1];
An attacker can craft a model such that filter->dims->data[1]
is 0.
References
- github.com/advisories/GHSA-cfpj-3q4c-jhvr
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2021-593.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2021-791.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2021-302.yaml
- github.com/tensorflow/tensorflow
- github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/lite/kernels/fully_connected.cc
- github.com/tensorflow/tensorflow/commit/718721986aa137691ee23f03638867151f74935f
- github.com/tensorflow/tensorflow/security/advisories/GHSA-cfpj-3q4c-jhvr
- nvd.nist.gov/vuln/detail/CVE-2021-37680
Detect and mitigate CVE-2021-37680 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 →