Headline
CVE-2022-23586: Eliminate `CHECK`-fail from `function.cc`. · tensorflow/tensorflow@3d89911
Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a SavedModel
such that assertions in function.cc
would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.
@@ -181,7 +181,9 @@ class FunctionInstantiationHelper {
DataTypeVector dtypes;
TF_RETURN_IF_ERROR(
ArgNumType(attr_values, arg_def, &is_type_list, &dtypes));
CHECK_GE(dtypes.size(), size_t{1});
if (dtypes.size() < size_t{1}) {
return errors::Internal(“Expected a list of at least one dtype”);
}
int arg_index = result_.nodes.size();
TF_RETURN_IF_ERROR(
AddItem(arg_def.name(), {true, arg_index, 0, is_type_list, dtypes}));