CVE-2021-41221
Access to invalid memory during shape inference in `Cudnn*` ops
Description
TensorFlow is an open source platform for machine learning. In affected versions the shape inference code for the `Cudnn*` operations in TensorFlow can be tricked into accessing invalid memory, via a heap buffer overflow. This occurs because the ranks of the `input`, `input_h` and `input_c` parameters are not validated, but code assumes they have certain values. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.
How to fix CVE-2021-41221
To remediate CVE-2021-41221, upgrade the affected package to a fixed version below.
- —upgrade to 2.4.4 or later
- —upgrade to 2.6.1 or later
- —upgrade to af5fcebb37c8b5d71c237f4e59c6477015c78ce6 or later
- —upgrade to af5fcebb37c8b5d71c237f4e59c6477015c78ce6 or later
- —upgrade to 2.6.1 or later
- —upgrade to af5fcebb37c8b5d71c237f4e59c6477015c78ce6 or later
- —upgrade to 2.6.1 or later
Is CVE-2021-41221 being exploited?
Low — EPSS is 0.0%, meaning exploitation activity has not been observed at scale.
Affected packages (7)
- >= 2.4.0, < 2.4.4, >= 2.5.0, < 2.5.2, >= 2.6.0, < 2.6.1
- >= 2.6.0, < 2.6.1
- from 0, < af5fcebb37c8b5d71c237f4e59c6477015c78ce6 | from 0, < 2.4.4, >= 2.5.0, < 2.5.2, >= 2.6.0, < 2.6.1, >= 2.7.0rc0, < 2.7.0
- from 0, < af5fcebb37c8b5d71c237f4e59c6477015c78ce6 | from 0, < 2.4.4, >= 2.5.0, < 2.5.2, >= 2.6.0, < 2.6.1, >= 2.7.0rc0, < 2.7.0
- >= 2.6.0, < 2.6.1
- from 0, < af5fcebb37c8b5d71c237f4e59c6477015c78ce6 | from 0, < 2.4.4, >= 2.5.0, < 2.5.2, >= 2.6.0, < 2.6.1, >= 2.7.0rc0, < 2.7.0
- >= 2.6.0, < 2.6.1
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | HIGH7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |