From df16be777d67a06ad7777e4d6fe13d1439c238e1 Mon Sep 17 00:00:00 2001 From: jeremiazhao Date: Wed, 8 Nov 2023 03:59:47 +0000 Subject: [PATCH] fixed CVE-2023-29941 --- fixed-CVE-2023-29941.patch | 12 ++++++++++++ llvm.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 fixed-CVE-2023-29941.patch diff --git a/fixed-CVE-2023-29941.patch b/fixed-CVE-2023-29941.patch new file mode 100644 index 0000000..c6e8d9e --- /dev/null +++ b/fixed-CVE-2023-29941.patch @@ -0,0 +1,12 @@ +--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp 2023-11-08 03:53:31.429602394 +0000 ++++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp 2023-11-08 03:53:13.810597066 +0000 +@@ -728,6 +728,9 @@ + operands.push_back(v); + } + auto insertPoint = op->template getParentOfType(); ++ if (!insertPoint) ++ return failure(); ++ + SmallString<32> funcName(op.getStable() ? kSortStableFuncNamePrefix + : kSortNonstableFuncNamePrefix); + FuncGeneratorType funcGenerator = diff --git a/llvm.spec b/llvm.spec index 70a3eb0..205ffd5 100644 --- a/llvm.spec +++ b/llvm.spec @@ -2,7 +2,7 @@ Name: llvm Version: 16.0.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Low Level Virtual Machine, modular and reusable compiler and toolchain License: Apache License v2.0 with LLVM Exceptions URL: http://llvm.org @@ -12,6 +12,7 @@ Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{versio Patch0001: 0001-SystemZ-Improve-error-messages-for-unsupported-reloc.patch Patch0002: 0001-cmake-Add-LLVM_UNITTEST_LINK_FLAGS-option.patch +Patch0003: fixed-CVE-2023-29941.patch Patch3001: 0001-llvm-Add-install-targets-for-gtest.patch Patch3002: 0201-third-party-Add-install-targets-for-gtest.patch Patch5000: Disable-INSTANTIATE_TEST_SUITE_P-OnAarch64.patch @@ -94,6 +95,7 @@ mv third-party-%{version}.src third-party %setup -T -q -b 0 -n llvm-%{version}.src %patch0001 -p2 %patch0002 -p2 +%patch0003 -p1 %patch3001 -p2 %ifarch aarch64 %patch5000 -p1 @@ -242,6 +244,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{_vpath_buildd %{_includedir}/llvm-gmock %changelog +* Wed Nov 08 2023 Zhao Zhen - 16.0.6-3 +- fixed CVE-2023-29941 + * Fri Sep 08 2023 OpenCloudOS Release Engineering - 16.0.6-2 - Rebuilt for OpenCloudOS Stream 23.09 -- Gitee