step-examples/12-11-adversarial/Ad111.stp
Sources
- bug-reporter language: "3MF zip bomb", "IFCZIP allocates gigs"
- CWE-409
- 3MF spec §3 (ZIP container)
- ISO 10303-21 (STEP body inside an IFCZIP-style wrapper)
Sender
deduced — adversarial input that exercises the ZIP-container decompression path used by 3MF / IFCZIP / similar STEP-adjacent wrappers
Description
3MF and IFCZIP are STEP-adjacent container formats: a ZIP archive whose entries include a Part-21 body (or an XML-encoded equivalent) plus auxiliary metadata. A maliciously-crafted ZIP archive carries one entry whose compressed bytes are tiny but whose uncompressed bytes claim gigabytes; the textbook ZIP bomb (`42.zip`-style nested archives, or a single highly-redundant entry). A receiver that extracts entries to a tempdir before parsing exhausts disk; one that decompresses to memory exhausts RAM. Distinct from Ad105 (archive-header lie): in this entry, the ZIP entry actually decompresses to the claimed size. Bug-reporter language: "3MF bomb", "IFCZIP decompression OOM", "ZIP entry blows up CAD loader".
Reproducer recipe
a 3MF file (ZIP archive) containing a single entry `3D/3dmodel.model` whose compressed-vs-uncompressed ratio is 1:5000; the entry is valid 3MF XML when decompressed but ~2 GB long. Cannot be embodied as a Part-21 fixture; the defect lives in the ZIP wrapper.
Expected kernel behavior
cap the per-entry decompression budget and abort with a precise diagnostic when exceeded; cap the per-archive total budget; refuse archives with implausible entry-count / total-size combinations; treat the container layer as adversarial.
Notes
Companion to Ad110 (gzip wrapper) — different container, same defect class. Distinct from Ad105 (archive *header* lies; this entry's bomb actually decompresses). **See also**: Ad027, Ad105, Ad110, Ad112, Pf030. Provenance tier: cross-file-state — bytes alone (a Part-21 body) cannot demonstrate this defect; the bomb is in the ZIP wrapper. **OCC behavior**: OCC accepts and loads a valid shape(1); the declared ZIP bomb lives in the 3MF/IFCZIP container 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
contains(b'3MF') or contains(b'IFCZIP') or contains(b'ZIP')contains(b'bomb') or contains(b'ratio')
Tier-3 assertions
load == "ok"
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Ad111: ZIP bomb inside 3MF/IFCZIP container wrapping a STEP body; ZIP archive entry 3D/3dmodel.model compressed-vs-uncompressed ratio 1:5000; entry actually decompresses to claimed size (~2 GB) unlike Ad105 header lie; receiver extracting to tempdir exhausts disk; extracting to memory exhausts RAM; distinct from Ad105 (archive-header lie â detectable from header alone); receiver must cap per-entry decompression budget with precise diagnostic; must cap per-archive total budget; must refuse archives with implausible entry-count / total-size combinations; CWE-409; 3MF spec §3 ZIP container; ISO 10303-21 STEP body in IFCZIP; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Ad111'),'2;1'); 5FILE_NAME('Ad111.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('Ad111','Ad111','',(#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=/* ZIP bomb in 3MF/IFCZIP container (ZIP-wrapper layer; cross-file-state): 26 3MF ZIP archive structure: 27 [Content_Types].xml (valid 3MF content-types manifest) 28 3D/3dmodel.model (the ZIP bomb entry) 29 compressed size: ~400 KB (highly-compressible repeated bytes) 30 uncompressed size: ~2 GB (ratio 1:5000) 31 content when decompressed: valid but enormous 3MF XML body 32 Unlike Ad105 the ZIP entry actually decompresses to the claimed size; 33 the bomb is not a header lie but a real high-ratio DEFLATE stream. 34 Applies to both 3MF and IFCZIP containers wrapping a STEP body. 35 Receiver must: cap per-entry budget; cap per-archive total; refuse 36 archives with implausible entry-count/size combinations. 37 This .stp file is the embedded STEP body (tiny; the bomb ratio 38 is in the ZIP wrapper, not in the STEP content inside it). */ 39CARTESIAN_POINT('ifczip_3mf_zip_bomb_note',(0.0,0.0,0.0)); 40ENDSEC; 41END-ISO-10303-21;