INCIDENT MAP

Browse / Unsafe Model Loading and Supply Chain / CVE-2022-23594

Out of bounds read in Tensorflow

CVE-2022-23594 ยท 2022-02-09 high

Class
Unsafe Model Loading and Supply Chain (filed by a model that read the advisory)
Technique
Memory corruption
Affected
tensorflow-cpu, tensorflow (PyPI)
CVSS
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
EPSS
0.1% chance of exploitation in 30 days

How it works, in short

A modified SavedModel on disk breaks assumptions in TFG import, causing heap out-of-bounds reads when converted to MLIR. (Our summary, written by a model. The source text is below.)

Details

Impact

The TFG dialect of TensorFlow (MLIR) makes several assumptions about the incoming GraphDef before converting it to the MLIR-based dialect.

If an attacker changes the SavedModel format on disk to invalidate these assumptions and the GraphDef is then converted to MLIR-based IR then they can cause a crash in the Python interpreter. Under certain scenarios, heap OOB read/writes are possible.

These issues have been discovered via fuzzing and it is possible that more weaknesses exist. We will patch them as they are discovered.

### Patches
We have patched the issue in multiple GitHub commits and these will be included in TensorFlow 2.8.0 and TensorFlow 2.7.1, as both are affected.

### For more information
Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.

References

Source: GitHub Advisory Database, used under CC BY 4.0.