# Gzip Listing Evidence
Version-bound synthetic experiments by Hesela. Not a vulnerability report or
production-safe untrusted-input validator.

## Finding
GNU gzip 1.14 reports aggregate decoded length but the final member's CRC.
The same numerical listing can describe different complete output bytes.
GNU 1.11/1.12 size behavior differs. See matrix-results.md for 99 cases.

## Files and provenance
The original fixtures, captures and source receipts come unchanged from
Hesela research commit 7d4a0cf40238b949aea5bd7d739f354ea71be8d3.
matrix-observations.json and matrix-replay.json contain full three-version
captures. capture/observations.json supplies independently fixed expected
lengths and SHA-256 digests. sources.json records the original sources;
the matrix source object records the exact GNU 1.14 archive and source hashes.
Third-party source code and binaries are not redistributed. No detached
signature verification or independent peer review is claimed.

## Offline evidence checks
Python 3.12 standard library; run from the extracted directory:
```sh
python3 -B version_matrix.py --verify matrix-observations.json --compare matrix-replay.json --table matrix-results.md --check-table
python3 -B -m unittest -v test_experiment.py test_verify.py test_version_matrix.py
python3 -B -O -m unittest -v test_experiment.py test_verify.py test_version_matrix.py
```
The tests use system GNU gzip 1.12 for small native controls. The additional
three-version native test is skipped unless the environment below is set.
An offline check validates recorded evidence, not a fresh full native replay.

## Native replay
Build GNU gzip 1.11 and 1.14 from their official release sources locally,
without installation; sources.json and the matrix pin release hashes.
Set HESELA_LEGACY_GZIP and HESELA_MODERN_GZIP to those binary paths,
and HESELA_MODERN_SOURCE to the exact gzip-1.14.tar.xz archive. Then rerun
the test commands above: all 41 tests, including the small native matrix,
must run without skips.

Full matrix, including the large member:
```sh
python3 -B version_matrix.py --legacy "$HESELA_LEGACY_GZIP" --modern "$HESELA_MODERN_GZIP" --system /usr/bin/gzip --source "$HESELA_MODERN_SOURCE" --include-wrap --output fresh-matrix.json --compare matrix-observations.json
```
Use a fresh output filename. The large synthetic fixture expands to 4 GiB +
17 bytes and is decoded several times; output is counted/hashed in chunks,
not stored as a large file. Allow CPU time. Do not bulk-extract its .gz payload.
Without --include-wrap, replay omits that fixture and cannot be compared
directly to the complete retained matrix.

## Limits
Eleven designed fixtures, three versions and three input modes on one host.
No timing, incidence, universal validity, hostile-input, concurrent-mutation
or crash-durability claim. GNU 1.13 and versions after 1.14 are untested.
The bounded consumer examples cap observed output, not all CPU or memory.
Removing a complete member or validly changing content needs independent
recovery expectations; internal validation alone cannot establish identity.

## Publication
https://hesela.com/analyses/compressed-archives-dictionary-dependencies/#gzip-listing
https://hesela.dev/terms/gzip/
