You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
area:securityThreat model, limits, disclosurepriority:P1On the path of the current milestonetype:securityHostile input, limits, supply chain and disclosure
Every cap (file, section, decompression, objects, handles, recursion, strings) in one struct with a conservative default and a documented permissive profile; THREAT_MODEL.md generated from or checked against it.
An inventory for the first acceptance item, "no allocation sized by file data without a cap". It was prompted by a Codex finding on #335.
DATATABLE reserved Vec::with_capacity(column_count) after a check against the bits left in the whole payload. Those bits can lie beyond the record's data-stream boundary, so a malformed record declaring 100,000,000 columns asked for gigabytes before it read its first column. #335 now starts the vectors at count.min(1024) and lets them grow as entries decode, as objects/dictionary.rs already does.
The same shape, Vec::with_capacity(<count read from the file>), appears at these sites. The list is taken from the head of the unp stack (#341), so it includes the decoders still in review. Calls sized by an existing buffer's .len() or by a constant are left out. Some of these counts may already be bounded against the record's boundary or a ParseLimits field before the allocation, and each site needs checking:
Two fixes would work, and each needs no new limit: start at count.min(N) and grow, or bound the count by the record's own data-stream boundary before the allocation. Either keeps a malformed record's failure an Error rather than an allocation abort. The hardening PR should come after the decoder stacks (#335 to #341, the R13 stack) land, because it touches the same files.
area:securityThreat model, limits, disclosurepriority:P1On the path of the current milestonetype:securityHostile input, limits, supply chain and disclosure
Activity
DrunkOnJava commentedon Oct 28, 2026
An inventory for the first acceptance item, "no allocation sized by file data without a cap". It was prompted by a Codex finding on #335.
DATATABLEreservedVec::with_capacity(column_count)after a check against the bits left in the whole payload. Those bits can lie beyond the record's data-stream boundary, so a malformed record declaring 100,000,000 columns asked for gigabytes before it read its first column. #335 now starts the vectors atcount.min(1024)and lets them grow as entries decode, asobjects/dictionary.rsalready does.The same shape,
Vec::with_capacity(<count read from the file>), appears at these sites. The list is taken from the head of the unp stack (#341), so it includes the decoders still in review. Calls sized by an existing buffer's.len()or by a constant are left out. Some of these counts may already be bounded against the record's boundary or aParseLimitsfield before the allocation, and each site needs checking:src/entities/acad_table.rs: lines 186, 210, 547, 551, 564src/entities/attdef.rs: lines 142, 154src/entities/attrib.rs: lines 231, 243src/entities/block.rs: lines 63, 76src/entities/hatch.rs: lines 321, 365, 420, 478, 499, 548, 552, 606src/entities/image.rs: lines 130src/entities/imagedef.rs: lines 133, 145src/entities/leader.rs: lines 128src/entities/lofted_surface.rs: lines 72src/entities/lwpolyline.rs: lines 181, 204, 208, 212src/entities/mesh.rs: lines 171, 202, 212, 224src/entities/mleader.rs: lines 416, 427, 522, 589, 604, 658, 724src/entities/mline.rs: lines 172, 178, 197, 216src/entities/mtext.rs: lines 364, 376src/entities/ole2_frame.rs: lines 70src/entities/proxy_entity_passthrough.rs: lines 83src/entities/spline.rs: lines 158, 162, 170src/entities/text.rs: lines 221, 234src/entities/tolerance.rs: lines 175, 187src/entities/underlay.rs: lines 141src/header.rs: lines 114src/metadata.rs: lines 76, 345, 350, 468, 492src/objects/acad_cell_style_map.rs: lines 48src/objects/acad_mlinestyle.rs: lines 129src/objects/acad_property_set_data.rs: lines 103src/objects/acad_table_style.rs: lines 269src/objects/block_sortents_table.rs: lines 49src/objects/class_map_extension.rs: lines 77src/objects/clip_spatial_filter.rs: lines 100src/objects/custom_dict_entry.rs: lines 57src/objects/data_table.rs: lines 101, 108, 116src/objects/eval_graph.rs: lines 110, 121src/objects/proxy_entity.rs: lines 51, 61src/objects/proxy_object.rs: lines 49, 59src/objects/sh_history.rs: lines 306src/objects/table_cell_style.rs: lines 236src/objects/table_content.rs: lines 412, 470, 514, 554, 578, 583, 590src/objects/table_geometry.rs: lines 123, 153src/objects/xdata.rs: lines 97, 113src/objects/xrecord.rs: lines 244src/r2007.rs: lines 149, 535, 690src/section_map.rs: lines 397, 420src/tables/ltype.rs: lines 146, 227src/tables/mod.rs: lines 100, 112Two fixes would work, and each needs no new limit: start at
count.min(N)and grow, or bound the count by the record's own data-stream boundary before the allocation. Either keeps a malformed record's failure anErrorrather than an allocation abort. The hardening PR should come after the decoder stacks (#335 to #341, the R13 stack) land, because it touches the same files.