CVE-2021-41217
Null pointer exception when `Exit` node is not preceded by `Enter` op
Description
TensorFlow is an open source platform for machine learning. In affected versions the process of building the control flow graph for a TensorFlow model is vulnerable to a null pointer exception when nodes that should be paired are not. This occurs because the code assumes that the first node in the pairing (e.g., an `Enter` node) always exists when encountering the second node (e.g., an `Exit` node). When this is not the case, `parent` is `nullptr` so dereferencing it causes a crash. 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-41217
To remediate CVE-2021-41217, 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 05cbebd3c6bb8f517a158b0155debb8df79017ff or later
- —upgrade to 05cbebd3c6bb8f517a158b0155debb8df79017ff or later
- —upgrade to 2.6.1 or later
- —upgrade to 05cbebd3c6bb8f517a158b0155debb8df79017ff or later
- —upgrade to 2.6.1 or later
Is CVE-2021-41217 being exploited?
Low — EPSS is 0.0%, meaning exploitation activity has not been observed at scale.
Affected packages (7)
- from 0, < 2.4.4, >= 2.5.0, < 2.5.2, >= 2.6.0, < 2.6.1
- >= 2.6.0, < 2.6.1
- from 0, < 05cbebd3c6bb8f517a158b0155debb8df79017ff | 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, < 05cbebd3c6bb8f517a158b0155debb8df79017ff | 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, < 05cbebd3c6bb8f517a158b0155debb8df79017ff | 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 | MEDIUM5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |