Repository navigation
Description
The gap
parse_standard_info_full returns silently when it cannot parse $STANDARD_INFORMATION:
- the resident-attribute header fields (value_length at +16, value_offset at +20) fall outside the record,
value_lengthis below 36 (neither the NTFS 3.0+ nor the 1.2 branch matches), or- the payload runs past the end of the buffer.
In all three cases ExtendedStandardInfo is left at Default, so the four timestamps read 0. FILETIME 0 is 1601-01-01, which is indistinguishable from a record whose $SI genuinely says 1601-01-01. Nothing anywhere records that the attribute failed to parse.
is_corrupt does not cover this. It is set only by the caller on fixup/USA failure (parse/forensic.rs:39,45); full.rs:680 hardcodes is_corrupt: false. There is no attribute-level damage representation in the crate at all. A record whose USA checks out but whose $SI is truncated or garbage parses as "fine" and reports 1601-01-01 as fact.
Scope: this is not a fragment-parser bug
parse_standard_info_full is called by io/parser/unified.rs:160 (bulk load) and parse/direct_index.rs:270 (live USN journal) — the two parsers every UFFS user runs — as well as parse/full.rs:120 (the public parse_record_full) and, as of the fix below, the deprecated fragment parser. The silent-default behavior predates all of this and lives in the bulk path.
Filed separately from #572 (fragment-parser removal) for that reason: if #572 closes as "delete the fragment parser," this must not close with it.
Incidence: latent, not live
Measured on real captures: 0 occurrences in 3,107,770 parsed records (drive C) and 0 in 15,079 (drive G). Every record had a $SI; none defaulted. This is not a current data-quality problem — it bites only on damaged or carved images, which is exactly the forensics use case. Deferring it is a decision, not a gamble.
Fix shape
Have parse_standard_info_full return a status instead of ():
enum StdInfoParse { V30, V12, Absent, Malformed }Callers that don't care ignore the return value (let _ = ...), so the bulk paths are unaffected. Surface it as si_malformed on ParsedRecord (a plain bool there is free — the struct already has a forensic bool block).
If it is also packed into FileRecord::forensic_flags, it must take bit 6 or 7. Bits 0-5 are all occupied:
| bit | meaning |
|---|---|
| 0 | is_deleted |
| 1 | is_corrupt |
| 2 | is_extension |
| 3 | has_default_data |
| 4 | has_i30_stream |
| 5 | is_unified |
| 6-7 | free |
set_forensic_flags preserves & 0b11_1000 precisely because 3-5 are in use. Writing into bit 3 would corrupt has_default_data, which compute_tree_metrics uses to distinguish "empty $DATA" from "no $DATA" — the damage would surface as wrong treesize/tree_allocated, far from the cause.
Note on a behavior change already landed
fix(mft): stop zeroing usn/security_id/owner_id in the fragment parser routed the fragment path through this shared helper. That was right for correctness, but it is worth recording that it was not neutral for carving:
- Before: a malformed
$SIhitbreak, aborting the whole attribute walk. Any$FILE_NAME/$DATAafter the$SIwas lost, so the record usually came out nameless. That is not a damage signal — it is data loss that happens to be conspicuous. - After:
$SIis left at default, the loop continues, names and streams survive, and the record looks entirely normal while reporting 1601-01-01.
A loud accidental artifact was traded for a quiet wrong answer. Correct for the bulk path; a real loss of signal for carving, and the reason this issue exists.
Activity
githubrobbi commentedon Jul 21, 2026
Resolved at the parse layer in
c1c317ff5.What landed
parse_standard_info_fullnow returnsStdInfoParseinstead of():V30V12MalformedAbsent$SIattribute at all — unusual, but not evidence of damage, so deliberately distinct fromMalformedPlus
is_malformed()/is_decoded()helpers, andParsedRecord::std_info_parseso the status reaches the public API (parse_record_full,parse_record_forensic) where an external index reads from.forensic/base.rsthreads it too.Cost, measured
ParsedRecordis still 256 bytes. The field lands in existing padding (fields summed to 252 before), verified withsize_ofbefore and after.StdInfoParseis 1 byte, returned in a register.unified.rs,direct_index.rsand the fragment parser discard the value, so it is dead and removed.Deliberately not
#[must_use]: the bulk pipelines have nowhere to record the status, and dropping it there is the correct choice rather than an oversight worth a lint. Each of the three sites says so in a comment.Deliberately not built
Representation — a searchable column, DataFrame projection, the daemon's shmem row — was descoped by the consumer, who builds a separate index and owns representation there. This issue is closed on the groundwork: the information now exists and is reachable at the parse layer.
If UFFS's own index and DataFrame output should ever carry it, that is a new issue, not a reopen of this one. It would take bit 6 or 7 of
FileRecord::forensic_flags— bits 0-5 are all occupied, and bit 3 (has_default_data) feedscompute_tree_metrics, so clobbering it surfaces as wrongtreesize/tree_allocatedfar from the cause. The bit table on the accessor block was completed indd099001c, since its truncated version is what made bit 3 look free in the first place.Coverage
undecodable_standard_info_reports_malformed_not_a_1601_timestamppins all threeMalformedconditions and the pair this exists to separate: a genuine all-zero (1601-01-01)$SIreturnsV30, while an undecodable one returnsMalformedwith identical timestamps.parse_record_full_reports_the_standard_info_parse_statuspins that the status survives to the public API for bothMalformedandAbsent.Incidence recorded above is unchanged and still the reason this was safe to do as groundwork rather than a hotfix: 0 in 3,107,770 records (drive C), 0 in 15,079 (drive G).
feat(mft): extended $SI fields, parse status, and macOS target-cpu fix (