diff --git a/CVE-2021-29556.patch b/CVE-2021-29556.patch new file mode 100644 index 0000000000000000000000000000000000000000..8e69d458dff51f9eb2b66b3460d0edae3ee20b04 --- /dev/null +++ b/CVE-2021-29556.patch @@ -0,0 +1,28 @@ +From 4071d8e2f6c45c1955a811fee757ca2adbe462c1 Mon Sep 17 00:00:00 2001 +From: Amit Patankar +Date: Thu, 29 Apr 2021 12:24:18 -0700 +Subject: [PATCH] Fix FPE issue with `tf.raw_ops.Reverse`. + +PiperOrigin-RevId: 371176973 +Change-Id: Ic6d483bfc95313ec2299c2d1c956cfe96c96626c +--- + tensorflow/core/kernels/reverse_op.cc | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/tensorflow/core/kernels/reverse_op.cc b/tensorflow/core/kernels/reverse_op.cc +index 5555a141b6c7b..560fac7133667 100644 +--- a/tensorflow/core/kernels/reverse_op.cc ++++ b/tensorflow/core/kernels/reverse_op.cc +@@ -155,6 +155,12 @@ class ReverseOp : public OpKernel { + + void Compute(OpKernelContext* context) override { + const Tensor& input = context->input(0); ++ // If input is provided, check to make sure the first dimension is valid. ++ if (input.dims() > 0) { ++ OP_REQUIRES( ++ context, input.dim_size(0) != 0, ++ errors::InvalidArgument("Invalid input first dimension. Found 0.")); ++ } + const Tensor& dims = context->input(1); + + if (TensorShapeUtils::IsScalar(input.shape())) { diff --git a/tensorflow.spec b/tensorflow.spec index 2c308c56fbcc525daaa4bee618b2415e8c09ae94..be88a7414d26aa8516cb197d474e85c3c8b4f90a 100644 --- a/tensorflow.spec +++ b/tensorflow.spec @@ -1,7 +1,7 @@ %global _empty_manifest_terminate_build 0 Name: tensorflow Version: 2.3.1 -Release: 4 +Release: 5 Summary: An Open Source Machine Learning Framework for Everyone License: Apache License 2.0 URL: https://www.tensorflow.org/ @@ -14,6 +14,7 @@ Patch0002: CVE-2021-29538.patch Patch0003: CVE-2021-29535.patch Patch0004: CVE-2021-29566.patch Patch0005: CVE-2021-29534.patch +Patch0006: CVE-2021-29556.patch Requires: python3-future Requires: python3-numpy @@ -60,6 +61,9 @@ bazel --output_user_root=`pwd`/../output_user_root build //tensorflow/tools/pip_ %{_bindir}/* %changelog +* Sun Jul 11 2021 mcfd - 2.3.1-5 +- Add patch CVE-2021-29556 + * Mon Jun 28 2021 polite2anyone - 2.3.1-4 - Add patch CVE-2021-29534