# NTFS update sequences: transfer markers are not content checksums

Source-reviewed and executed 23 October 2026. This is an original, bounded
native-library experiment, not a Windows test or a disk-reliability benchmark.

## Finding

The tested NTFS-3G fixup routine rejected mismatched trailer markers but accepted
modified interior bytes, modified saved trailer words and substitution of sectors
carrying the same marker. Acceptance is therefore narrower than payload identity.
The result is expected from the check's design, not a newly discovered vulnerability.

## Method and evidence

The installed library is Ubuntu libntfs-3g89t64 1:2022.10.3-1.2ubuntu3.2.
The captures record its path, SHA-256, Python version and platform. We did not
install, compile or change it. The upstream source review is pinned to
78414d93613532fd82f3a82aba5d4a1c32898781. This does not assert that the Ubuntu
binary is an unmodified build of that upstream commit.

The original generator creates 512-, 1024- and 4096-byte buffers with a FILE
signature, array offset 48 and deterministic contents. They are valid inputs for
the selected multisector-header checks, not complete MFT records. Thirty-six read
configurations cover intact controls, interior changes, saved-word changes,
marker mismatches, alternative-record substitution and malformed lengths/counts.
First/last marker changes are identical controls at 512 bytes.

Five pre-write controls start at 1, 41, 65533, 65534 and 65535. The last is an
explicit invalid-prior-marker boundary input, not a normal emitted marker.
Each has a post-read round-trip check. These five round trips are separate
from the 36-case read matrix. Two capture files match exactly. Repetition and
Python optimization modes do not create independent environments.

A separately written byte-slice oracle checks return codes, errno and every
output byte. Tests independently calculate original trailer bytes and verify
that a late mismatch does not partially restore earlier trailers. The report
generator replays the native experiment before publishing results and rejects
missing rows, forged output, changed environment and boolean-for-integer outcomes.
An initial test caught the last issue in this new harness; it was fixed before
delivery. No production-site software defect is inferred from that harness test.

## Results

| Controlled change | Accepted / cases |
| --- | --- |
| Unchanged records | 3 / 3 |
| Interior-bit mutation | 3 / 3 |
| Saved trailer-word mutation | 3 / 3 |
| First or last trailer-marker mutation | 0 / 3 each |
| Entire alternative record | 3 / 3 |
| Later sectors from another record, same marker | 2 / 2 |
| Later sectors from another record, different marker | 0 / 2 |
| Invalid count, alignment or overlapping array | 0 / 3 each |
| Nonmultiple-of-512 record length | 0 / 2 |

The table is fixture coverage, not an estimated probability. Whole-record and
same-marker substitutions illustrate missing identity checks; no real stale
write, physical tear or adversarial attack was reproduced.

For a 1024-byte buffer, count 3 passes and count 6 fails. Three 16-bit elements
occupy six bytes. Microsoft labels the member as a size in bytes, but the
implementation's usa_count is an element count. Record both units rather than
copying that label into parser arithmetic. The observed 65534-to-1 transition
also illustrates why the marker is not a permanent version identity.

## Sources and synthesis

- [Microsoft MULTI_SECTOR_HEADER](https://learn.microsoft.com/en-us/windows/win32/devnotes/multi-sector-header):
  NTFS 3.0/3.1 scope, 512-byte stride, saved words and transfer assumptions.
- [Pinned NTFS-3G mst.c](https://github.com/tuxera/ntfs-3g/blob/78414d93613532fd82f3a82aba5d4a1c32898781/libntfs-3g/mst.c):
  is_valid_record and pre/post fixup functions. Source license GPL-2.0-or-later;
  no upstream code or binary is redistributed in this original fixture package.
- [Linux-NTFS fixup documentation](https://flatcap.github.io/linux-ntfs/ntfs/concepts/fixup.html):
  a worked example of saving and restoring record trailers.
- [Microsoft Change Journals](https://learn.microsoft.com/en-us/windows/win32/fileio/change-journals):
  the USN change journal is a different change-tracking facility.
- [Bairavasundaram et al., FAST 2008](https://www.usenix.org/legacy/events/fast08/tech/full_papers/bairavasundaram/bairavasundaram.pdf):
  An Analysis of Data Corruption in the Storage Stack, pp. 223-238, sections 2.2-3.2.
  Authors: Lakshmi N. Bairavasundaram, Garth R. Goodson, Bianca Schroeder,
  Andrea C. Arpaci-Dusseau and Remzi H. Arpaci-Dusseau. No DOI was verified.

The FAST paper studies logged observations from a WAFL-based fleet over
41 months, not NTFS. Its separate checksum, block-identity and parity classes
show why detection mechanism and observation path must be named. Our
experiment applies that reasoning to a different mechanism, without transferring
fleet rates or claiming replication. The paper also limits observability:
customers may disable reporting and scrubs cannot be established for every disk.
There is no random population sample or confidence interval for our fixed fixtures.

## Reproduction

Requires the recorded Ubuntu library, or an explicitly documented alternative
environment. No root privileges or mounted filesystem are needed.

```sh
python3 study.py capture capture-new.json
python3 study.py verify capture-new.json
python3 study.py summary capture-new.json
python3 -m unittest -v test_study.py
python3 -O -m unittest -v test_study.py
sha256sum -c SHA256SUMS
```

Tests compare the retained capture with this environment, so a different library
or platform should fail that exact-replay check. Make a separate capture and
review differences; do not silently replace historical evidence. The native
routine logs expected EINVAL/EIO diagnostics for negative controls.

Original code, fixtures and generated observations: CC0-1.0. Third-party source
documents retain their own licenses. No Windows, full filesystem, hardware
failure, repair, throughput or comparative reliability result is claimed.

## Lifecycle continuation

The separate [lifecycle study](LIFECYCLE.md) retains 24 additional call sequences,
including repeated fixups, writer-side restoration and an explicit API-misuse
counterexample. The original observations above are unchanged. The strict JSON
reader repair and new artifact manifest are documented in that supplement.
