Ip005 — COLLADA `<p>` primitive index references vertex beyond `<source>`

§12.15 import-format parser robustness (sub-class: index-out-of-range)

P2 — spec deviation (no data loss)

silent-loss

Sources

Description

A COLLADA `<triangles>` block's `<p>0 1 5</p>` index list references vertex index 5, but the `<source>`/`<accessor>` declares only 3 vertices (`count="3"`). `CopyVertex` indexes the position array by the `<p>` value without bounds-checking it against the accessor count, reading past the `<float_array>`. First COLLADA/DAE-format fixture in the corpus.

Reproducer recipe

a minimal `.dae` with a 3-vertex POSITION source and a `<triangles>` `<p>` list naming an index ≥ 3.

Expected kernel behavior

validate every `<p>` index against the referenced source's accessor count before dereference; reject with a diagnostic or skip the primitive.

Notes

Cross-oracle: trimesh 4.12 + pycollada instantiate the geometry then silently drop the primitive to an empty mesh (0 faces vs the intended 1 triangle); assimp reads past the source (#6522) — verified 2026-07-12. Synonyms: "COLLADA p index out of range", "primitive index beyond source", "DAE CopyVertex overflow", "vertex index exceeds accessor count". Provenance tier: bytes-only. First COLLADA coverage.

Expected validation

Provenance tier

bytes-only — defect not fully embodied in fixture bytes.

Byte assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Ip005 assimp#6522 <p> primitive index references vertex beyond <source> -->
3<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
4  <library_geometries>
5    <geometry id="g0" name="g0">
6      <mesh>
7        <source id="pos">
8          <float_array id="pos-array" count="9">0 0 0 1 0 0 0 1 0</float_array>
9          <technique_common>
10            <accessor source="#pos-array" count="3" stride="3">
11              <param name="X" type="float"/>
12              <param name="Y" type="float"/>
13              <param name="Z" type="float"/>
14            </accessor>
15          </technique_common>
16        </source>
17        <vertices id="verts">
18          <input semantic="POSITION" source="#pos"/>
19        </vertices>
20        <triangles count="1">
21          <input semantic="VERTEX" source="#verts" offset="0"/>
22          <p>0 1 5</p>
23        </triangles>
24      </mesh>
25    </geometry>
26  </library_geometries>
27  <library_visual_scenes>
28    <visual_scene id="scene0">
29      <node id="n0" name="n0">
30        <instance_geometry url="#g0"/>
31      </node>
32    </visual_scene>
33  </library_visual_scenes>
34  <scene>
35    <instance_visual_scene url="#scene0"/>
36  </scene>
37</COLLADA>