Vulnerability · Published Nov 5, 2021 · Assigned by GitHub_M
CVE-2021-41227Arbitrary memory read in `ImmutableConst`
Medium 6.6
In plain English
A medium-severity out-of-bounds read in tensorflow from tensorflow. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 15% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
TensorFlow is an open source platform for machine learning. In affected versions the `ImmutableConst` operation in TensorFlow can be tricked into reading arbitrary memory contents. This is because the `tstring` TensorFlow string class has a special case for memory mapped strings but the operation itself does not offer any support for this datatype. 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | tensorflow | 2.4.4, 2.5.2, 2.6.1, 2.7.0 | PYSEC-2021-419 |
| PyPI | tensorflow | 2.6.1 | GHSA-j8c8-67vp-6mx7 |
| PyPI | tensorflow | 2.5.2 | GHSA-j8c8-67vp-6mx7 |
| PyPI | tensorflow | 2.4.4 | GHSA-j8c8-67vp-6mx7 |
| PyPI | tensorflow-cpu | 2.5.2 | GHSA-j8c8-67vp-6mx7 |
| PyPI | tensorflow-cpu | 2.4.4, 2.5.2, 2.6.1, 2.7.0 | PYSEC-2021-636 |
| PyPI | tensorflow-cpu | 2.6.1 | GHSA-j8c8-67vp-6mx7 |
| PyPI | tensorflow-cpu | 2.4.4 | GHSA-j8c8-67vp-6mx7 |
| PyPI | tensorflow-gpu | 2.4.4, 2.5.2, 2.6.1, 2.7.0 | PYSEC-2021-834 |
| PyPI | tensorflow-gpu | 2.6.1 | GHSA-j8c8-67vp-6mx7 |
| PyPI | tensorflow-gpu | 2.5.2 | GHSA-j8c8-67vp-6mx7 |
| PyPI | tensorflow-gpu | 2.4.4 | GHSA-j8c8-67vp-6mx7 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| tensorflow | tensorflow | >= 2.6.0, < 2.6.1>= 2.5.0, < 2.5.2< 2.4.4 |
Weakness: CWE-125 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L
References
- https://github.com/tensorflow/tensorflow/security/advisories/GHSA-j8c8-67vp-6mx7 x_refsource_CONFIRM
- https://github.com/tensorflow/tensorflow/commit/1cb6bb6c2a6019417c9adaf9e6843ba75ee2580b x_refsource_MISC
- https://github.com/tensorflow/tensorflow/commit/3712a2d3455e6ccb924daa5724a3652a86f6b585 x_refsource_MISC