제출 #1053738: assimp <= 6.0.5 Out-of-bounds Write정보

제목assimp <= 6.0.5 Out-of-bounds Write
설명# assimp: heap corruption in the ASE importer reaches an invalid `delete[]` (out-of-bounds write / invalid free) ## Advisory metadata (GitHub Security Advisory form) | field | value | | --- | --- | | Ecosystem | `Other` — assimp is not published to a registry ecosystem that advisories can match | | Package name | `assimp` (repository `assimp/assimp`) | | Affected versions | `master` up to `f936bf18` (2026-09-24) — **verified there**; `<= 6.0.5` assumed affected | | Patched versions | *(none)* | | Severity | **High** (7.0–8.8) | | CVSS 3.1 | `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H` = **7.0**; server-side `AV:N/…/UI:N` = **8.8** | > **Severity: High** — AddressSanitizer classifies the first invalid access as a **write** (memory corruption), not a plain crash: an attacker-influenced index or length drives a store outside the buffer that owns it. > while the process is freeing memory: the heap metadata/pointer has already been corrupted by an out-of-bounds write > performed while importing the file, so this is memory corruption (CWE-787 + CWE-590/CWE-761), not a plain crash. ## Summary The ASE importer builds `aiMesh` objects from counts taken out of the file. With a crafted `.ase` file the importer stores past the end of one of the mesh arrays; the corruption is only detected later, when the scene is destroyed and the corrupted pointer is passed to `operator delete[]`: ``` ==9==ERROR: AddressSanitizer: SEGV on unknown address 0xfffffffffffffff5 (pc 0x5ffb646d2ae2 bp 0x5ffb65f95b48 sp 0x7fff5c71cb40 T0) ==9==The signal is caused by a WRITE memory access. ``` The corruption is systematic: **~2000 crash samples across 8 export campaigns** (`assimp export <in> out.{obj,ply,gltf,glb,stl,fbx,dae,x}`) carry this same signature, and every one of them is an ASE input reaching the ASE import path. ## Sanitizer stack (write inside the allocator, invalid pointer) ``` #0 0x5ffb646d2ae2 in __asan::Allocator::Deallocate(void*, unsigned long, unsigned long, __sanitizer::BufferedStackTrace*, __asan::AllocType) (/home/dell/data1/czh/projects/2026/fogfuzz/.scratch/newfmt/assimp-asan/bin/assimp+0x275ae2) (BuildId: f0d3b66988c560a1079d5bbdce680400ae33efb9) #1 0x5ffb64790dd6 in operator delete[](void*) (/home/dell/data1/czh/projects/2026/fogfuzz/.scratch/newfmt/assimp-asan/bin/assimp+0x333dd6) (BuildId: f0d3b66988c560a1079d5bbdce680400ae33efb9) #2 0x5ffb647f8d89 in aiMesh::~aiMesh() /home/dell/data1/czh/projects/2026/fogfuzz/.scratch/newfmt/assimp-git/include/assimp/mesh.h:873:13 #3 0x5ffb64d6f1c1 in Assimp::ASEImporter::InternReadFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, aiScene*, Assimp::IOSystem*) /home/dell/data1/czh/projects/2026/fogfuzz/.scratch/newfmt/assimp-git/code/AssetLib/ASE/ASELoader.cpp:193:17 #4 0x5ffb64c4257b in Assimp::BaseImporter::ReadFile(Assimp::Importer*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Assimp::IOSystem*) /home/dell/data1/czh/projects/2026/fogfuzz/.scratch/newfmt/assimp-git/code/Common/BaseImporter.cpp:127:9 #5 0x5ffb647dc170 in Assimp::Importer::ReadFile(char const*, unsigned int) /home/dell/data1/czh/projects/2026/fogfuzz/.scratch/newfmt/assimp-git/code/Common/Importer.cpp:709:30 ``` ## Fault site (source) The import path that produces the corrupt state is `ASEImporter::InternReadFile()`: ``` // Now build the output mesh list. Remove dummies pScene->mNumMeshes = (unsigned int)avOutMeshes.size(); aiMesh **pp = pScene->mMeshes = new aiMesh *[pScene->mNumMeshes]; for (std::vector<aiMesh *>::const_iterator i = avOutMeshes.begin(); i != avOutMeshes.end(); ++i) { if (!(*i)->mNumFaces) { (*i)->mColors[2] = nullptr; delete *i; continue; } *pp++ = *i; } pScene->mNumMeshes = (unsigned int)(pp - pScene->mMeshes); ``` ## How to reproduce ```sh assimp export poc.ase out.stl # any output format; the corruption happens during import ``` Both attached samples crash on every run (2/2 each) with the plain build (`SIGSEGV`, exit status 139) and with the ASan build. ## Suggested fix Validate the mesh data read from the file before it is stored: the number of faces/vertices declared in the ASE chunk must be checked against the size of the arrays that are allocated for them, and every index taken from the file must be range-checked before use (`mFaces`/`mVertices` capacity >= declared count). ## Impact Importing an untrusted ASE model corrupts the heap; the process aborts (invalid free) and the corruption is a plausible exploitation primitive (denial of service plus potential code execution). ## Attachments - `seeds/id:000143,sig:11,src:000054,time:2129146,execs:620586,op:quick,pos:4487,val:+15` — crashes every run - `seeds/id:000150,sig:11,src:000054,time:2141217,execs:623088,op:quick,pos:6974,val:+15` — crashes every run - `asan/assimp-ase-heap-corruption-asan.txt` — AddressSanitizer report (invalid **write** while freeing) Samples are unmodified AFL++ test cases with their original file names. ## Plain-build verification (rules out sanitizer-layout artifacts) The same input was replayed against the **plain (non-sanitizer) release build** of the same source tree: | condition | result | | --- | --- | | plain build, repeated | `-11`, `-11`, `-11`, `-11`, `-11` (SIGSEGV) — consistent every run | | `MALLOC_CHECK_=3` (glibc heap consistency checks) | `-11` | | ASLR disabled (`setarch -R`) | `-11` | The process dies from a real signal in a normal build, and glibc's heap checks also abort on the corrupted heap, so the report above is **not** an artifact of AddressSanitizer redzones, allocator layout or instrumentation.
원천⚠️ https://github.com/PassMoon/CVE-application/tree/main/assimp-2-ase-heap-corruption
사용자
 Anonymous User
제출2026. 10. 23. AM 09:57 (1 월 ago)
모더레이션2026. 11. 22. AM 09:31 (1 month later)
상태수락
VulDB 항목442088 [Open Asset Import Library Assimp 까지 6.0.5 ASE File Importer ASELoader.cpp InternReadFile 메모리 손상]
포인트들20

Interested in the pricing of exploits?

See the underground prices here!