diff --git a/CVE-2024-40724-Fix-out-of-bound-access-5651.patch b/CVE-2024-40724-Fix-out-of-bound-access-5651.patch new file mode 100644 index 0000000000000000000000000000000000000000..ef009b98f53eba74fc73c25d94d4b713f24fd756 --- /dev/null +++ b/CVE-2024-40724-Fix-out-of-bound-access-5651.patch @@ -0,0 +1,27 @@ +From ddb74c2bbdee1565dda667e85f0c82a0588c8053 Mon Sep 17 00:00:00 2001 +From: Kim Kulling +Date: Wed, 3 Jul 2024 21:37:24 +0200 +Subject: [PATCH] Fix out of bound access (#5651) + +--- + code/AssetLib/Ply/PlyLoader.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/code/AssetLib/Ply/PlyLoader.cpp b/code/AssetLib/Ply/PlyLoader.cpp +index 783c7f1..e109541 100644 +--- a/code/AssetLib/Ply/PlyLoader.cpp ++++ b/code/AssetLib/Ply/PlyLoader.cpp +@@ -567,6 +567,10 @@ void PLYImporter::LoadFace(const PLY::Element *pcElement, const PLY::ElementInst + if (mGeneratedMesh->mFaces == nullptr) { + mGeneratedMesh->mNumFaces = pcElement->NumOccur; + mGeneratedMesh->mFaces = new aiFace[mGeneratedMesh->mNumFaces]; ++ } else { ++ if (mGeneratedMesh->mNumFaces < pcElement->NumOccur) { ++ throw DeadlyImportError("Invalid .ply file: Too many faces"); ++ } + } + + if (!bIsTriStrip) { +-- +2.41.0 + diff --git a/assimp.spec b/assimp.spec index 4475f1a8c4f37146e760e2b6206404b0717df015..fab47ccdb7cc88008bee15ac4b5b21048efc10e2 100644 --- a/assimp.spec +++ b/assimp.spec @@ -1,11 +1,13 @@ Name: assimp Version: 5.2.4 -Release: 1 +Release: 2 Summary: Library to load and process various 3D model formats into applications. License: BSD and MIT and LGPL-2.1 and LGPL-2.0 and GPL-2.0 and LGPL-3.0 and GPL-3.0 URL: http://www.assimp.org/ Source0: https://github.com/assimp/assimp/archive/v%{version}.tar.gz Patch0001: 0001-Fix-build-with-zlib.patch +Patch0002: CVE-2024-40724-Fix-out-of-bound-access-5651.patch + BuildRequires: gcc-c++ boost-devel cmake dos2unix irrlicht-devel irrXML-devel BuildRequires: doxygen poly2tri-devel gtest-devel pkgconfig(zzip-zlib-config) BuildRequires: pkgconfig(zlib) pkgconfig(minizip) gmock-devel make @@ -83,6 +85,9 @@ install -m 0644 port/PyAssimp/pyassimp/*.py %{buildroot}%{python3_sitelib}/pyass %{python3_sitelib}/pyassimp %changelog +* Mon Jul 22 2024 yinyongkang - 5.2.4-2 +- fix CVE-2024-40724 + * Mon Oct 17 2022 yaoxin - 5.2.4-1 - Upgrade to 5.2.4