step-examples/12-11-adversarial/Ad032.stp
Sources
- 12-adversarial.md A032
Description
WHERE rules invoke EXPRESS functions transitively; attacker references entities such that rule evaluation loops through entity graph repeatedly. Even O(n²) evaluation with cycles is weaponisable.
Reproducer recipe
graph of 10⁴ `EDGE_CURVE` entities each referencing two `VERTEX_POINT`s in star topology that triggers WHERE-rule re-checks.
Expected kernel behavior
per-file rule-evaluation budget; abort with `E_RULE_BUDGET`.
Notes
M DoS. **See also**: Ad027, Ad054, Ad055, Pf030. 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
count_entity_def(b'EDGE_CURVE') >= 5count_entity_def(b'EDGE_CURVE') >= 10
Tier-3 assertions
load == "ok"
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Ad032: schema-EXPRESS rule recursion bomb: star topology of EDGE_CURVE entities sharing VERTEX_POINTs triggers O(n²) WHERE-rule re-evaluation; kernel must enforce per-file rule-evaluation budget (E_RULE_BUDGET); GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Ad032'),'2;1'); 5FILE_NAME('Ad032.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#3=CARTESIAN_POINT('',(0.0,0.0,0.0)); 12#4=CARTESIAN_POINT('',(10.0,0.0,0.0)); 13#5=VERTEX_POINT('',#3); 14#6=VERTEX_POINT('',#4); 15#7=CARTESIAN_POINT('',(0.0,0.0,0.0)); 16#8=DIRECTION('',(1.0,0.0,0.0)); 17#9=VECTOR('',#8,10.0); 18#10=LINE('',#7,#9); 19#11=EDGE_CURVE('star_0',#5,#6,#10,.T.); 20#12=CARTESIAN_POINT('',(0.1,1.0,0.0)); 21#13=DIRECTION('',(1.0,0.0,0.0)); 22#14=VECTOR('',#13,10.0); 23#15=LINE('',#12,#14); 24#16=EDGE_CURVE('star_1',#5,#6,#15,.T.); 25#17=CARTESIAN_POINT('',(0.2,2.0,0.0)); 26#18=DIRECTION('',(1.0,0.0,0.0)); 27#19=VECTOR('',#18,10.0); 28#20=LINE('',#17,#19); 29#21=EDGE_CURVE('star_2',#5,#6,#20,.T.); 30#22=CARTESIAN_POINT('',(0.3,3.0,0.0)); 31#23=DIRECTION('',(1.0,0.0,0.0)); 32#24=VECTOR('',#23,10.0); 33#25=LINE('',#22,#24); 34#26=EDGE_CURVE('star_3',#5,#6,#25,.T.); 35#27=CARTESIAN_POINT('',(0.4,4.0,0.0)); 36#28=DIRECTION('',(1.0,0.0,0.0)); 37#29=VECTOR('',#28,10.0); 38#30=LINE('',#27,#29); 39#31=EDGE_CURVE('star_4',#5,#6,#30,.T.); 40#32=CARTESIAN_POINT('',(0.5,5.0,0.0)); 41#33=DIRECTION('',(1.0,0.0,0.0)); 42#34=VECTOR('',#33,10.0); 43#35=LINE('',#32,#34); 44#36=EDGE_CURVE('star_5',#5,#6,#35,.T.); 45#37=CARTESIAN_POINT('',(0.6,6.0,0.0)); 46#38=DIRECTION('',(1.0,0.0,0.0)); 47#39=VECTOR('',#38,10.0); 48#40=LINE('',#37,#39); 49#41=EDGE_CURVE('star_6',#5,#6,#40,.T.); 50#42=CARTESIAN_POINT('',(0.7,7.0,0.0)); 51#43=DIRECTION('',(1.0,0.0,0.0)); 52#44=VECTOR('',#43,10.0); 53#45=LINE('',#42,#44); 54#46=EDGE_CURVE('star_7',#5,#6,#45,.T.); 55#47=CARTESIAN_POINT('',(0.8,8.0,0.0)); 56#48=DIRECTION('',(1.0,0.0,0.0)); 57#49=VECTOR('',#48,10.0); 58#50=LINE('',#47,#49); 59#51=EDGE_CURVE('star_8',#5,#6,#50,.T.); 60#52=CARTESIAN_POINT('',(0.9,9.0,0.0)); 61#53=DIRECTION('',(1.0,0.0,0.0)); 62#54=VECTOR('',#53,10.0); 63#55=LINE('',#52,#54); 64#56=EDGE_CURVE('star_9',#5,#6,#55,.T.); 65#57=CARTESIAN_POINT('',(1.0,10.0,0.0)); 66#58=DIRECTION('',(1.0,0.0,0.0)); 67#59=VECTOR('',#58,10.0); 68#60=LINE('',#57,#59); 69#61=EDGE_CURVE('star_10',#5,#6,#60,.T.); 70#62=CARTESIAN_POINT('',(1.1,11.0,0.0)); 71#63=DIRECTION('',(1.0,0.0,0.0)); 72#64=VECTOR('',#63,10.0); 73#65=LINE('',#62,#64); 74#66=EDGE_CURVE('star_11',#5,#6,#65,.T.); 75#67=CARTESIAN_POINT('',(1.2,12.0,0.0)); 76#68=DIRECTION('',(1.0,0.0,0.0)); 77#69=VECTOR('',#68,10.0); 78#70=LINE('',#67,#69); 79#71=EDGE_CURVE('star_12',#5,#6,#70,.T.); 80#72=CARTESIAN_POINT('',(1.3,13.0,0.0)); 81#73=DIRECTION('',(1.0,0.0,0.0)); 82#74=VECTOR('',#73,10.0); 83#75=LINE('',#72,#74); 84#76=EDGE_CURVE('star_13',#5,#6,#75,.T.); 85#77=CARTESIAN_POINT('',(1.4,14.0,0.0)); 86#78=DIRECTION('',(1.0,0.0,0.0)); 87#79=VECTOR('',#78,10.0); 88#80=LINE('',#77,#79); 89#81=EDGE_CURVE('star_14',#5,#6,#80,.T.); 90#82=CARTESIAN_POINT('',(1.5,15.0,0.0)); 91#83=DIRECTION('',(1.0,0.0,0.0)); 92#84=VECTOR('',#83,10.0); 93#85=LINE('',#82,#84); 94#86=EDGE_CURVE('star_15',#5,#6,#85,.T.); 95#87=CARTESIAN_POINT('',(1.6,16.0,0.0)); 96#88=DIRECTION('',(1.0,0.0,0.0)); 97#89=VECTOR('',#88,10.0); 98#90=LINE('',#87,#89); 99#91=EDGE_CURVE('star_16',#5,#6,#90,.T.); 100#92=CARTESIAN_POINT('',(1.7,17.0,0.0)); 101#93=DIRECTION('',(1.0,0.0,0.0)); 102#94=VECTOR('',#93,10.0); 103#95=LINE('',#92,#94); 104#96=EDGE_CURVE('star_17',#5,#6,#95,.T.); 105#97=CARTESIAN_POINT('',(1.8,18.0,0.0)); 106#98=DIRECTION('',(1.0,0.0,0.0)); 107#99=VECTOR('',#98,10.0); 108#100=LINE('',#97,#99); 109#101=EDGE_CURVE('star_18',#5,#6,#100,.T.); 110#102=CARTESIAN_POINT('',(1.9,19.0,0.0)); 111#103=DIRECTION('',(1.0,0.0,0.0)); 112#104=VECTOR('',#103,10.0); 113#105=LINE('',#102,#104); 114#106=EDGE_CURVE('star_19',#5,#6,#105,.T.); 115#107=CARTESIAN_POINT('',(2.0,20.0,0.0)); 116#108=DIRECTION('',(1.0,0.0,0.0)); 117#109=VECTOR('',#108,10.0); 118#110=LINE('',#107,#109); 119#111=EDGE_CURVE('star_20',#5,#6,#110,.T.); 120#112=CARTESIAN_POINT('',(2.1,21.0,0.0)); 121#113=DIRECTION('',(1.0,0.0,0.0)); 122#114=VECTOR('',#113,10.0); 123#115=LINE('',#112,#114); 124#116=EDGE_CURVE('star_21',#5,#6,#115,.T.); 125#117=CARTESIAN_POINT('',(2.2,22.0,0.0)); 126#118=DIRECTION('',(1.0,0.0,0.0)); 127#119=VECTOR('',#118,10.0); 128#120=LINE('',#117,#119); 129#121=EDGE_CURVE('star_22',#5,#6,#120,.T.); 130#122=CARTESIAN_POINT('',(2.3,23.0,0.0)); 131#123=DIRECTION('',(1.0,0.0,0.0)); 132#124=VECTOR('',#123,10.0); 133#125=LINE('',#122,#124); 134#126=EDGE_CURVE('star_23',#5,#6,#125,.T.); 135#127=CARTESIAN_POINT('',(2.4,24.0,0.0)); 136#128=DIRECTION('',(1.0,0.0,0.0)); 137#129=VECTOR('',#128,10.0); 138#130=LINE('',#127,#129); 139#131=EDGE_CURVE('star_24',#5,#6,#130,.T.); 140ENDSEC; 141END-ISO-10303-21;