open-standards/wai/http-conformance/falsify/manifest-limit-dropped.patch
Transaction Science 010ee79b28 wai: the HTTP corpus holds the manifest reader limit at its edge
No case reached the new limit: with the check deleted from
http_verify.parse_head, every case still gave its outcome, and no committed
envelope declares a man_len past 2^27. Four parse_head cases now do, on a
WAI1 (O5) and a WAI2 (OD): eight bytes declaring 2^27 + 1 are refused
(head_malformed), and eight declaring 2^27 ask for the head they declare
(need 134217740 and 134217738). Both implementations give all four.

falsify/manifest-limit-dropped.patch drops the check from head::parse_head,
and http_verify.py --mutate manifest-limit-dropped drops it on the Python
side; run.sh runs both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-09 16:56:04 -04:00

14 lines
818 B
Diff

# must fail: head_malformed_manifest_too_large_O5 head_malformed_manifest_too_large_OD
# a man_len past the reader limit is asked for, not refused (head::parse_head)
diff --git a/wai/wai-rs/src/http_binding/head.rs b/wai/wai-rs/src/http_binding/head.rs
index 83fe9492..53219b7c 100644
--- a/wai/wai-rs/src/http_binding/head.rs
+++ b/wai/wai-rs/src/http_binding/head.rs
@@ -66,7 +66,6 @@ pub fn parse_head(prefix: &[u8], envelope_len: u64) -> Result<HeadParse, RangeRe
_ => return Err(RangeRefusal::HeadMalformed("the magic is neither WAI1 nor WAI2".into())),
};
let man_len = u32_at(prefix, 4);
- crate::container::check_manifest_len(man_len).map_err(RangeRefusal::HeadMalformed)?;
let manifest = 8..8 + man_len;
let (head_len, components) = match version {
Version::Wai1 => {