[
https://issues.apache.org/jira/browse/AVRO-4304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ismaël Mejía reassigned AVRO-4304:
----------------------------------
> Add cross-SDK interop test vectors for malformed/rejected binary encodings
> --------------------------------------------------------------------------
>
> Key: AVRO-4304
> URL: https://issues.apache.org/jira/browse/AVRO-4304
> Project: Apache Avro
> Issue Type: Test
> Components: csharp, interop, javascript, perl, c, php, ruby, c++,
> java, python
> Reporter: Ismaël Mejía
> Assignee: Ismaël Mejía
> Priority: Major
>
> h2. Summary
> Decoder hardening across the SDKs now rejects a range of malformed binary
> encodings (e.g. un-negatable {{Long.MIN_VALUE}}/{{INT64_MIN}} collection block
> counts, negative/out-of-range union branch and enum symbol indices, overlong
> varints, oversized and zero-byte-element collection block counts). These fixes
> were made per SDK, but there is *no shared cross-language fixture*
> guaranteeing
> that every SDK rejects the same malformed inputs identically. Without one, the
> SDKs can drift (one accepts what another rejects).
> h2. Proposed approach
> * Add a set of shared "must-reject" interop vectors under {{share/test/}} --
> each
> vector being a small schema + a raw binary payload + the expectation that
> decoding *fails* (with a bounded, well-defined error rather than a crash /
> OOM / stack overflow).
> * Wire a thin per-SDK test harness that loads the vectors and asserts each is
> rejected, complementing the existing (positive) interop data.
> * Seed it with the cases already fixed: {{Long.MIN_VALUE}}/{{INT64_MIN}} block
> counts, negative and too-large union/enum indices, overlong (>10-byte)
> varints, and oversized collection block counts.
> h2. Relationship
> * AVRO-4292 -- collection/allocation limits and the index/varint hardening
> whose
> behavior these vectors lock in across languages.
> * AVRO-4302 / AVRO-4283 -- once recursion-depth and decompressed-size limits
> land, "too deep" and "decompression bomb" vectors can be added here too.
> Recommend an umbrella with one subtask per SDK plus the shared fixtures.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)