Ad042 — Reference to entity-of-wrong-type in attribute slot

§12.11 (sub-class: type-confusion / null-deref)

P2 — spec deviation (no data loss)

crash spec-violation adversarial

Sources

Description

Schema SELECT type validated by structural shape only; attribute type is wrong subtype, leading downstream chained calls (`x->A()->B()`) to deref a null handle.

Reproducer recipe

minimum AP214 with `#27=SHAPE_DEFINITION_REPRESENTATION(#23,#26)` where `#23=SHAPE_ASPECT(..)` instead of `PROPERTY_DEFINITION_SHAPE`.

Expected kernel behavior

Reject with `E_SELECT_BRANCH` diagnostic via schema-aware select-narrowing that distinguishes branches; must not crash by dereffing wrong-typed entity.

Notes

Documented as 1088/1267 SDRs broken in a 430 MB CATIA V6 file. **See also**: Ad030. Validation observed: silent-empty rather than the cited crash. The structural attack pattern (e.g., billion-laughs / cyclic-reference / very-large-string) is demonstrated; production-scale exploitation requires inflating the size factor as described. Kernel-mishandling-by-silent-acceptance is itself a defect signal at fixture scale.

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Byte assertions

Tier-3 assertions

Cross-references

Ad030

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* Ad042: type-confusion: SHAPE_ASPECT in SHAPE_DEFINITION_REPRESENTATION attribute slot that requires PROPERTY_DEFINITION_SHAPE; schema SELECT branch mismatch → null-handle deref on chained accessor; 1088/1267 SDRs broken in 430 MB CATIA V6 file; GEOMETRIC_CURVE_SET IS model entity — OCC yields empty */
3HEADER;
4FILE_DESCRIPTION(('Ad042'),'2;1');
5FILE_NAME('Ad042.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
7ENDSEC;
8DATA;
9#1=CARTESIAN_POINT('',(0.0,0.0,0.0));
10#2=GEOMETRIC_CURVE_SET('',(#1));
11#23=SHAPE_ASPECT('mistyped_aspect','wrong branch',#9000,.T.);
12#24=PRODUCT_DEFINITION_SHAPE('','',#9000);
13#25=SHAPE_REPRESENTATION('',(#1),#9000);
14#26=ADVANCED_BREP_SHAPE_REPRESENTATION('',(#1),#9000);
15#27=SHAPE_DEFINITION_REPRESENTATION(#23,#26);
16ENDSEC;
17END-ISO-10303-21;