Variant analysis: 1 unfixed sibling safety gap in assimp
Summary
Variant analysis of historical fixes in assimp identified 1 code site where an integer-overflow guard, bounds check, or safe-allocation wrapper exists at one location but is missing at a structurally identical sibling location (same file, same function, or same pattern family) elsewhere in the codebase.
Each finding below is code-confirmed against the current HEAD (verified by cloning the repository fresh and checking the pattern is still present), with the exact file/line locations, the root cause, a description of the trigger path, and — where available — ASan/execution verification output or a proof-of-concept.
Note on origin: these were surfaced by an automated variant-analysis pipeline that diffs historical fix commits against sibling code paths, then has each candidate manually reviewed. I'm posting them together per-project rather than as separate issues to respect maintainer time. Happy to split, close, or reprioritize any of these as you see fit.
Finding 1: Assimp: heap-buffer-overflow read in ColladaParser::ExtractDataObjectFromChannel
Verified against HEAD: f936bf18 (2026-09-24)
Status: READY — fully verified, no open items.**
Summary
A genuinely novel, execution-verified heap-buffer-overflow read, found via variant analysis: it lives in the exact function a real CVSS-8.8 CVE (CVE-2022-45748) was patched in, in a code path that patch didn't cover.
Location
code/AssetLib/Collada/ColladaParser.cpp:1990,ColladaParser::ExtractDataObjectFromChannel- Allocation site:
ColladaParser::ReadAccessor,ColladaParser.cpp:1509-1595 - Project:
github.com/assimp/assimp - Confirmed at: HEAD
c693cb0d68ce6ed38b8c2c592fec5fb603a35bb6(2026-09-18,main) - Also confirmed present at an earlier pinned commit checked during this analysis
(
fe1965b3e73f7c241265e8e5b3015764936a6ce5, 2026-08-12) — checked out that exact commit, the 2022 CVE fix's bulk check (ColladaParser.cpp:1829,1857) is present, and the unguarded per-subOffset read at line ~1990 is byte-identical. Same vulnerable state at both commits — safe to build the task against the existing pin, no re-pin needed.
Root cause
CVE-2022-45748's fix (commit 4b9f46db) added a bulk size check before resolving an
accessor's data pointer:
const size_t dataSize = acc->mOffset + acc->mCount * acc->mStride;
if (dataSize > acc->mData->mValues.size()) {
throw DeadlyImportError("Not enough data for accessor");
}But the actual per-index read in the same function reads a fixed 4-component object at a per-parameter sub-offset that the bulk check never accounts for:
// ColladaParser.cpp:1978-1991
const ai_real *dataObject = &(acc.mData->mValues[0]) + acc.mOffset + pLocalIndex * acc.mStride;
ai_real obj[4];
for (size_t c = 0; c < 4; ++c) {
obj[c] = dataObject[acc.mSubOffset[c]]; // line 1990
}mSubOffset[c] comes from <param> declaration order (0, 1, 2, ...); mStride comes from
a separate, independent XML stride attribute (defaults to 1). Nothing ties the two
together — the bulk check bounds offset + count*stride, never stride > max(subOffset).
Trigger / PoC
A <source> whose <float_array> has exactly count floats, with
<accessor count="count" stride="1"> declaring 3 named params (X, Y, Z — subOffsets
0, 1, 2, stride 1). The bulk check passes; for the last valid vertex index, dataObject[1]
and dataObject[2] read past the std::vector<ai_real>'s heap allocation. Fires
unconditionally in the for (c=0; c<4; ++c) loop before any semantic-type switch — works
for any channel type. Reachable via a bare mesh, no animation/controllers needed.
Verification
Built assimp at HEAD with -fsanitize=address,undefined (Debug, GCC 12.3, ninja,
assimp_cmd), ran against a minimal crafted .dae (3-float array, 3-param accessor,
one triangle). Reproduced live:
==3120615==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000013c
READ of size 4 at 0x60200000013c thread T0
#0 ... Assimp::ColladaParser::ExtractDataObjectFromChannel(...) ColladaParser.cpp:1990
#1 ... Assimp::ColladaParser::CopyVertex(...) ColladaParser.cpp:1942
#2 ... Assimp::ColladaParser::ReadPrimitives(...) ColladaParser.cpp:1898
0x60200000013c is located 0 bytes to the right of 12-byte region [0x602000000130,0x60200000013c)
allocated by ... std::vector<float, std::allocator<float>>::reserve(...)Methodology
For each historical vulnerability fix in the codebase, we identified the safe pattern the fix introduced (an overflow guard, a safe allocator wrapper, a bounds check) and searched the rest of the codebase for structurally identical code that predates or postdates the fix but never received it. Each candidate was then manually verified against the current HEAD listed above.
Happy to provide anything else that would help triage — additional PoC inputs, a minimal patch following the existing safe-sibling pattern, or a written reproduction script.
Source: assimp/assimp