# FAT32 FSInfo evidence

Companion to [Hesela's capacity analysis](https://hesela.com/analyses/sparse-files-preallocation-thin-capacity/#fat32-fsinfo).

Seven designed inputs and two FatFs R0.16 policies were exercised at -O2 and
-O0 with UndefinedBehaviorSanitizer. The 28 retained executions represent
14 input-policy combinations, not independent devices. All requested writes
are 1,536 bytes on fresh ordinary 64 MiB image files. No Linux FAT mount,
physical card, power-loss durability, latency or field failure rate was tested.

Read result-o2.table.md or result-ubsan.table.md for all fourteen cases.
The JSON files include the complete environment and per-case observations.
publication.json is the derived seven-row comparison used in the article.
The byte count and payload were checked by both native readback and a separate
fixture-specific FAT/directory parser; prefix equality alone is not completeness.

## Reproduce

Obtain these files from this directory: experiment.py, probe.c, test_experiment.py,
result-o2.json, result-ubsan.json, both .table.md files, sources.json,
publication.json, README.md and SHA256SUMS. Verify the downloaded inventory
with `sha256sum -c SHA256SUMS`. This detects changes relative to the manifest,
not malicious replacement of the whole packet.

Use Python 3.12, GCC, dosfstools 4.2, and the separately obtained upstream archive.
The producer checks the archive and extracted source hashes before compiling.
Run against newly generated ordinary files only. The scratch directory must exist.

```sh
curl -fL https://elm-chan.org/fsw/ff/arc/ff16.zip -o /tmp/ff16.zip
python3 experiment.py --archive /tmp/ff16.zip --scratch /tmp --output /tmp/fsinfo-replay.json
FATFS_ARCHIVE=/tmp/ff16.zip FATFS_SCRATCH=/tmp PYTHONDONTWRITEBYTECODE=1 python3 -m unittest -v test_experiment
FATFS_ARCHIVE=/tmp/ff16.zip FATFS_SCRATCH=/tmp PYTHONDONTWRITEBYTECODE=1 python3 -O -m unittest -v test_experiment
```

All generated image files and binaries are removed after each run. The original
observations stay unchanged. Native replay is explicitly skipped unless both
environment variables are supplied. Repeated runs on this host are not
independent-environment replication.

Upstream code is fetched separately with its permissive notice preserved;
Microsoft's specification and third-party source files are not redistributed.
sources.json retains URLs, version/section locators and source-capture limitations.
FatFs documents both the FSInfo policy and checking the f_write byte count.
These results demonstrate a known contract, not a newly discovered vulnerability.
