Ad105 — `.stpz` / `.stpx` archive container claims gigabytes of uncompressed data

§12.11 adversarial (sub-class: decompression bomb)

adversarial

Sources

Sender

deduced — adversarial input

Description

The `.stpz` and `.stpx` extensions denote ZIP / gzip-archive variants of STEP transfer. A maliciously-crafted archive can claim gigabytes of uncompressed payload from a few kilobytes of input — the standard ZIP-bomb / gzip-bomb pattern. A receiver that decompresses into memory before parsing exhausts RAM or swap. The defect is at the archive-wrapper layer, not in the STEP bytes. Bug-reporter language: "STEP archive bomb", "stpz allocates gigs", "decompression OOM on STEP". Provenance tier: cross-file-state — bytes alone (a STEP body) cannot demonstrate this; the demonstration is in the archive wrapper plus the receiver's decompression policy.

Reproducer recipe

a ZIP archive whose entry header advertises uncompressed size of 10 GB but whose compressed bytes are tiny (highly-compressible repeated bytes); the entry contains a 100-character STEP body. Cannot be embodied as a Part-21 fixture; the defect lives in the archive layer.

Expected kernel behavior

cap the per-archive-entry decompression budget (size, time); refuse to load when the budget is exceeded with a precise diagnostic; treat the archive layer as adversarial.

Notes

First entry exercising the .stpz / .stpx archive wrapper as an attack surface. **See also**: Ad104. Provenance tier: cross-file-state; bytes alone cannot demonstrate this defect; the bomb lives in the archive header, not the embedded STEP body. The static `.stp` fixture encodes only the embedded body; the receiver-side amplification requires an actual archive wrapper. **OCC behavior**: OCC accepts and loads a valid shape(1); the declared decompression bomb lives in the `.stpz`/`.stpx` archive-header wrapper, not in this embedded Part-21 body. Base and clean give identical shape-counts and validity; shape(1) does not witness a kernel bug.

Expected validation

occt=shape(1)/shape(1) gmsh=shape(1) ifc=schema_n/a

Provenance tier

cross-file-state — defect not fully embodied in fixture bytes.

Byte assertions

Tier-3 assertions

Cross-references

Ad104

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Ad105: decompression bomb: .stpz/.stpx archive header advertises 10 GB uncompressed size; compressed payload is tiny; receiver decompresses into memory before parsing, exhausting RAM; receiver must cap per-archive-entry decompression budget (size+time); CWE-409; ISO 10303-21 §12 compressed-archive transfer; See also Ad104; cross-file-state defect; GEOMETRIC_CURVE_SET IS model entity — OCC yields empty */
3HEADER;
4FILE_DESCRIPTION(('Ad105'),'2;1');
5FILE_NAME('Ad105.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
7ENDSEC;
8DATA;
9#9000=APPLICATION_CONTEXT('mechanical design');
10#1=CARTESIAN_POINT('',(0.0,0.0,0.0));
11#2=GEOMETRIC_CURVE_SET('',(#1));
12#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
13#9051=PRODUCT('Ad105','Ad105','',(#9050));
14#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
15#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
16#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
17#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
18#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
19#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
20#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
21#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
22#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
23#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#2),#9060);
24#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
25#9063=/* stpz decompression bomb (archive-wrapper layer):
26   ZIP local file header:
27     signature:        PK\x03\x04
28     compression:      deflate (8)
29     compressed size:  5 bytes
30     uncompressed size: 10737418240 bytes (10 GB)
31   The archive entry body is 5 null bytes; a receiver that inflates
32   without a size budget allocates 10 GB of RAM before parsing.
33   Receiver must: cap decompression budget; reject oversized entries.
34   This .stp file is the embedded STEP body (tiny; the bomb is the
35   archive header, not the STEP content inside it). */
36CARTESIAN_POINT('stpz_bomb_note',(0.0,0.0,0.0));
37ENDSEC;
38END-ISO-10303-21;