Research notes / Data lifecycle
SSD sanitization: why TRIM and a successful command are not enough
Published · Updated · Evidence review, not an erasure certificate
Deleting a file, releasing its blocks and sanitizing its data are different operations. Before releasing an SSD, identify the required assurance, the exact operation and the evidence that it finished successfully.
On this page13 sections
The address you overwrite is not the flash page you remember
An SSD's flash translation layer maps logical addresses to physical pages. An update can place the new version elsewhere while leaving the previous bytes outside the host-visible mapping. Reading the new value through that mapping does not inspect the old location. [1, section 2.2]
The practical question is therefore not simply whether a file can still be opened. It is which recovery path the chosen process is meant to resist. NIST SP 800-88 Rev. 2 distinguishes clear, purge and destroy; its September 2025 edition replaces Rev. 1. Clear addresses recovery through the ordinary interface, purge targets more capable recovery while potentially preserving reuse, and destroy combines laboratory-recovery resistance with making the medium unusable. These are assurance categories, not interchangeable button labels. [2, section 3.1]
Choose a method before choosing a command
A method states the required recovery resistance. A technique is the medium-specific way to achieve it. Rev. 2 leaves most technology-specific techniques to standards such as IEEE 2883 or another standard accepted by organizational policy; it is not a universal drive-command recipe. [2, sections 3.1 and 4.4]
| Method | Recovery boundary | Reuse and limitation |
|---|---|---|
| Clear | Logical treatment of all user-addressable storage locations against simple, non-invasive recovery through the device interface available to the user. | Typically preserves usability. It does not promise that inaccessible physical flash pages were erased. |
| Purge | Suitable logical or physical treatment makes target-data recovery infeasible using current state-of-the-art laboratory techniques. | Potential reuse, not guaranteed reuse. Cryptographic erase qualifies only when its prerequisites are met. |
| Destroy | Recovery is infeasible using current state-of-the-art laboratory techniques, and the medium cannot store data again. | No reuse of the data-bearing medium. A broken controller or a drilled hole alone does not demonstrate this outcome. |
Inoperable is not the same as sanitized. Degaussing can be a physical purge technique for suitable magnetic media; it does not sanitize flash and is not classified as destroy simply because a drive becomes unusable. The magnetic field must suit the medium's coercivity, and magnetic treatment does not cover flash components in a hybrid device. NIST's July 2026 FAQ reinforces this distinction. [2, sections 3.1.2-3.1.3] [7, Q8]
For an SSD, additional ordinary host-overwrite passes do not by themselves establish purge assurance over remapped or spare flash locations. Do not substitute a pass count for evidence about the technique and the data-bearing areas it covers. [2, section 3.1.1] [7, Q6]
Four operations, four different questions
| Operation | Question it addresses | Evidence still needed |
|---|---|---|
| POSIX unlink | Was this directory entry removed? | Other hard links, open descriptors and residual copies can remain. |
| Ordinary discard / TRIM | Which logical ranges may the device reclaim? | A separate sanitization assurance. |
| Device sanitize | Did the supported device operation run? | Its final status and suitability for the medium. |
| Cryptographic erase | Can target ciphertext still be decrypted? | Encryption coverage and sanitization of applicable keys. |
For POSIX-style file removal, unlink() removes a name, not necessarily the file's last reference. Another hard link still names the file; an open descriptor can retain access after the last name is removed. Neither outcome establishes media sanitization. [19]
Even Linux's terminology distinguishes ordinary discard from secure discard. The latter requests erasure of copies created by garbage collection and requires device support. A tool accepting an option is not a reason to assume every drive or intervening storage layer supports it. Direct block-device discard is destructive; it is not a harmless diagnostic. [4]
ATA capacity limits: which addresses did the overwrite reach?
A Host Protected Area (HPA) lowers the maximum address available to ordinary host I/O. It is not merely a partition omitted from a filesystem listing. An overwrite of the currently visible device cannot reach the excluded addresses. The cited ATA/ATAPI-6 document describes this legacy mechanism but is a historical working draft, not a current approved standard. [12, section 6.15]
Device Configuration Overlay (DCO) can restrict features as well as capacity. In Seagate's documented implementation, a DCO capacity reduction also changes READ NATIVE MAX ADDRESS. The word native therefore does not make that result an unrestricted-capacity inventory. These logical limits are distinct from SSD remapped pages and spare NAND. [13, section 11.2.3]
Do not generalize the host-overwrite limit to every device erase. Seagate's 2021 maintainer clarification says normal ATA Security Erase omits HPA/DCO-protected regions, whereas enhanced erase and Sanitize include them. Its AMAC comparison needs the separate caveat below. This is manufacturer command-scope guidance, not verification of any particular drive or a universal SATA feature list. [14]
Accessible Max Address Configuration (AMAC) separates the native maximum from the accessible maximum. ACS-3 revision 5 says that re-exposed contents are indeterminate: increasing visibility does not promise recovery of prior bytes. This is a historical working draft, not a current approved standard. [15, sections 4.5 and 7.2]
The source conflict remains unresolved. The draft's Table 91 places both normal and enhanced Security Erase user-data coverage through the native maximum, consistent with the 2021 AMAC clarification. The same table distinguishes reallocated user data: normal mode does not erase it, while enhanced mode does. But Seagate's ATA Security guide, last edited in 2026, warns that normal erase may leave data above the current maximum, explicitly including AMAC. We do not infer a standards change or a tested firmware behavior from that disagreement. Establish the applicable command-set revision and model/firmware evidence before accepting the operation's coverage. [15, section 7.39] [14] [16, Security Erase]
Name the frozen feature. These are configuration locks, not a read-only state or evidence of sanitization. The legacy SET MAX password is separate from Security Mode. DCO freezing also blocks DEVICE CONFIGURATION IDENTIFY, so an aborted query alone does not establish that DCO is unsupported. [12, sections 6.15 and 8.8.2-8.8.3]
In ACS-3 revision 5, AMAC FREEZE bars later SET requests, but a successful SET also bars another SET before power-on reset. A refusal alone does not identify an explicit FREEZE; hardware and software resets do not clear that freeze. Record the applicable command and state rather than reducing the evidence to a generic locked label. [15, sections 7.2.3-7.2.4]
Restoring capacity is not sanitizing data. Nor does a capacity limit remaining in place prove that a device-internal erase skipped the excluded addresses. Keep the host's observation boundary separate from the documented operation boundary. NIST Rev. 2 asks for device-specific implementation information, any uncovered areas and available validation evidence. [2, Appendix B]
Hesela's operational inference: include capacity restrictions, relevant device capabilities and the chosen command's documented coverage in the release record. Do not change capacity or issue an erase as a diagnostic shortcut. We did not alter or erase a device.
What the FAST experiment actually established
Wei, Grupp, Spada and Swanson wrote identifiable patterns, applied erasure procedures, then read raw flash chips using custom hardware. Of 12 SSDs examined, eight advertised ATA SECURITY support; one encrypted drive could not be verified. Four of the remaining seven executed ERASE UNIT reliably. One reported success while data remained intact. Two others required a recent firmware reset to work properly; without it they erased only the first LBA and correctly reported failure. [1, section 3.2.1 and Table 1]
Digital recovery is not analog recovery. The study searched chip readouts for identifiable data; it explicitly did not investigate analog erasure further. Its digital results do not establish that every residual electrical signal is unrecoverable. [1, sections 2.2 and 3.1]
The denominator matters: seven verifiable implementations, not twelve modern drives. This 2011 laboratory sample is not a present-day NVMe failure rate, and unverified encryption is not a demonstrated failure. The durable lesson is methodological: distinguish an implementation's report from independently established behavior.
Format NVM: one namespace is not always the boundary
Format NVM selects a supported media format, including logical-block size, metadata placement and protection information for the NVM Command Set. It is not filesystem creation. [9, section 4.1.2]
SES=0 is not a safe preview. It requests no secure erase, not preservation of existing data. SES=1 requests User Data Erase, which may use cryptographic erase when all affected data is encrypted; SES=2 requests Cryptographic Erase. Neither setting promises a zero-filled readback. [8, Secure Erase Settings]
In Base 2.0e, SES=0 selects FNA bit 0 for scope; SES=1 or 2 selects FNA bit 1. Apply the selected bit below. [3, section 5.14, Figure 193]
| Selected FNA bit | NSID | Affected namespaces |
|---|---|---|
| 0 | Allocated namespace ID | That namespace only. |
| 0 | FFFFFFFFh | Those attached to the receiving controller. |
| 1 | Allocated ID or FFFFFFFFh | All namespaces in the NVM subsystem. |
FNA bit 3=1 rejects FFFFFFFFh; bit 2 advertises cryptographic-erase support. Thus a particular NSID is not always a containment boundary, and FFFFFFFFh does not always mean the whole subsystem. [3, sections 5.14 and 5.17.2.1]
Successful Format completion follows formatting. Sanitize instead requires a later operation-status check. [3, sections 5.14 and 8.21] The nvme-cli documentation also warns against inferring controller relationships from matching device-name numbers. [8]
Hesela's operational inference: record controller identity, namespace attachments, SES, FNA, requested format and final status together. Review the potentially affected namespaces before authorizing data loss. These fields explain scope; they do not certify physical erasure or replace the validation process below.
NVMe: the command can finish before the operation
The cited NVMe Base Specification 2.0e defines Block Erase, Overwrite and Crypto Erase actions, subject to controller support. Sanitization runs in the background. A successful command completion does not establish that the operation finished. [3, section 5.24]
Progress alone is insufficient. In its Sanitize Status log, SPROG is FFFFh whenever the status is not in-progress, including failure or no prior sanitization. Inspect SSTAT, not just an apparently full progress counter. [3, section 5.16.1.25, Figure 272]
The same progress value, four different outcomes
These authored inputs all use SPROG=FFFFh and set Global Data Erased. Decode the low three SSTAT bits separately from that flag and the overwrite-pass bits. [10]
| SSTAT | Reported state | Why the distinction matters |
|---|---|---|
0100h | Never sanitized | Global Data Erased can describe an unwritten device, not a completed erase. |
0103h | Failed | The progress sentinel does not override failure. |
0102h | Still processing | The fraction is 65535 / 65536, strictly below one. |
0104h | Success with unexpected deallocation | Data was deallocated despite a No-Deallocate request; preserve that distinction. |
A previous success can survive a rejected new command. Base 2.0e leaves the log unchanged when a Sanitize command completes unsuccessfully. Correlate the command result with the log and intended operation; a status snapshot alone cannot establish freshness. [3, section 8.21, p. 444]
Version boundary: Base 2.3 adds namespace targeting and Media Verification behavior. This 2.0e example is not a general decoder for newer layouts. [11, Figure 302, pp. 296-297]
Hesela's standalone field interpreter and executable tests reproduce the four examples. Run the adjacent files with node --test nvme-sanitize-status-2-0e.test.mjs. They access no device. The example requires an explicit revision and refuses to infer success from reserved encodings or inconsistent progress. A reported success is still not a release authorization or proof of physical erasure.
The nvme-cli project documents a read-only sanitize-log query. Its current documentation uses nvme log sanitize; older releases use nvme sanitize-log. Match documentation to the installed version. Retrieving the log is distinct from starting a destructive operation. We did not issue either operation to a drive. [6]
Readback has another subtlety: NVM Express explains that post-sanitize reads can encounter integrity-check behavior, and deallocation can determine what the host sees. A page of zeros is not a direct photograph of NAND. Conversely, a read error alone does not establish that an otherwise documented sanitize operation failed. Interpret it using the selected operation and device documentation. [5]
Crypto erase moves the proof obligation to the keys
Cryptographic erase can make target data inaccessible without rewriting every ciphertext block. But the encryption must have covered the sensitive data, the cryptography and key management must be suitable, and the required key copies must be sanitizable. Enabling encryption immediately before disposal cannot retroactively protect plaintext remnants. NIST explicitly discusses earlier plaintext and backed-up or escrowed keys. Its prior-plaintext condition applies since the last appropriate sanitization, not necessarily since the medium was manufactured. [2, sections 3.2.2-3.2.3, including footnote 10]
Sanitizing a wrapping or master key is not enough while usable lower-level or previously unwrapped keys survive. NIST calls for eliminating keys below the targeted key and accounting for unwrapped copies in memory or encryption-engine registers. External key copies can also re-enable access. A certificate records the evidence; it does not remove these decryption paths. [2, sections 3.2.3 and 4.6]
A password reset is not automatically destruction of the data-encryption key. Nor does a drive-local action erase a separate backup. Inventory the relevant data and key copies, then assess each within its own storage and retention boundary. Long-lived confidentiality also matters because ciphertext may remain after key sanitization. [2, section 3.2]
Which keys does the command actually cover?
Identify whether the command sanitizes a data-encryption key, a wrapping key or a derivation key. If a device uses several data-encryption keys, establish whether the available command covers all required keys or needs additional actions. Also establish whether the implementation reports success or failure when a key-storage location cannot be sanitized. A success label without those implementation details leaves coverage unresolved. NIST lists these as traceability questions; it does not establish that a particular device falsely reports success. [2, section 3.2.5, items 4, 9-10]
For external key management, retain the key-management system's own sanitization evidence: the storage device may have no visibility into that operation. Documentation must also account for recoverable escrow or backup copies. [2, section 3.2.5, printed page 17] Connect this evidence to verification before making the separate validation decision.
What changed when the key rotated?
Envelope encryption separates the data-encryption key (DEK), which encrypts the payload, from a key-encryption key (KEK), which wraps the DEK. The stored object retains ciphertext and its wrapped key. NIST's wrapping definition covers key confidentiality and integrity; payload authentication remains a separate design question. [20] [23, sections 3.1 and 5.2]
Key rotation need not migrate that object. AWS KMS documents that rotation changes current key material while preserving decryption with earlier material. It neither rotates existing data keys nor re-encrypts payloads, and does not remedy a compromised DEK. Google Cloud KMS likewise separates rotation from re-encryption and retirement of old versions. These are named service behaviors, not guarantees about an SSD's erase command. [22] [21]
Service integration changes the migration story. Google Cloud CMEK integrations may automatically rewrap existing DEKs, use the new primary only for subsequent encryption, or keep using the originally configured version. Automatic migration can take time. Check the resource-specific contract and migration evidence before treating a KMS rotation event as completion for stored objects. [25]
| Operation | What changes | What still needs assessment |
|---|---|---|
| Activate a new KEK version only | New wraps selecting the new version use new key material. | Activation alone does not rewrap existing DEKs; assess any service-driven migration separately. |
| Rewrap an existing DEK | The encrypted representation of the same data key. | Payload ciphertext can stay unchanged; old wrapped and plaintext key copies remain relevant. |
| Re-encrypt with a new DEK | The payload's encryption key and ciphertext. | Migration coverage and retained old ciphertext/key copies. |
| Cryptographic erase | Usable decryption paths are eliminated through suitable key sanitization. | Encryption coverage and all applicable key copies, as discussed above. |
The table is a synthesis of the key hierarchy, separate re-encryption workflow and NIST sanitization conditions. Before retiring a key version, establish that every object which must remain readable has a usable recovery path without it. Destroying a still-needed version can cause permanent data loss. A rotation log does not answer that inventory question. [24] [21] [2, section 3.2]
Deleted content and historical traces are different targets
HiFlash describes a subtler residual: even when a deleted page's contents are cleared, its position among surviving pages can reveal that a record existed. A history-independent filesystem above an ordinary flash translation layer does not automatically protect the physical layout. [17, sections I and IV]
History independence addresses information in a representation, with an explicit observation model. HiFlash's basic scheme claims strong history independence; its random-wear-leveling variant provides only the weak form. Epoch-based wear leveling deliberately retains history, and the paper warns that difficulty guessing an entire operation sequence does not rule out learning something about it. [17, section VI-A]
| Boundary | Question | Qualification |
|---|---|---|
| One inspection | What does this representation disclose? | Weak history independence. [17] |
| Repeated inspections | What do several representations disclose together? | Strong history independence. [17] |
| Client compromise | What survives disclosure of client state? | vORAM+HIRB allows bounded recent-history leakage. [18] |
ORAM is not a substitute for this analysis. Roche, Aviv and Choi distinguish access-pattern privacy, history leakage after client compromise, and protection of deleted values. Their HIRB structure is history independent, but the surrounding vORAM prevents the combined system from having perfect history independence. Their model assumes an honest-but-curious server and erasable client memory; it is not a claim about arbitrary SSD firmware or malicious storage. [18, sections 1.2-1.3 and 3]
Hesela's assessment rule: state whether the target is a name, recoverable content, an access trace or historical metadata, then identify every layer the evidence covers. These research distinctions supplement the sanitization assessment; they do not certify a device. We did not implement HiFlash or reproduce either paper's experiments.
A useful release record contains evidence, not just a green tick
NIST separates verification, checking the operation's outcome, from validation, deciding whether that outcome is acceptable. For clear and purge, Rev. 2 does not call for elaborate post-sanitization sampling unless organizational policy requires it. The historical chip-reading experiment is not a requirement to dismantle every drive. [2, section 4.5]
| Stage | What is assessed | What it does not establish alone |
|---|---|---|
| Verification | Inspect completion status, errors, anomalies and media health for clear or logical purge; inspect equipment completion for physical purge, or remnants and equipment identity for destruction. | A suitable method for the data sensitivity or an acceptable remaining confidentiality risk. |
| Validation | Use verification evidence, target-data sensitivity, technique suitability and remaining risk to accept or reject the result. | A guarantee created by a success label. Rejection requires a different suitable technique or a stronger method, with reusability checked again. |
For a concrete counterexample, NIST describes degaussing an SSD: the equipment can report successful completion while the technique remains ineffective for flash. Verification of completion therefore cannot replace validation of suitability. This is NIST's explanatory example, not a Hesela hardware experiment. [2, section 4.5.2] [7, Q7-Q8]
The following checklist is Hesela's operational synthesis of those distinctions:
- Identify the asset, model, serial number, firmware and intended destination. Establish the target data and whether the medium will be reused.
- Record the approved method, specific technique, tool version and supported device capability. A missing capability is a reason to choose another approved route.
- Preserve the final operation result, errors and anomalies. Keep command acceptance separate from operation completion.
- For cryptographic erase, record encryption coverage and the treatment of relevant key copies. Include backups and escrow in the assessment.
- Document the validation decision and responsible operator. Quarantine a failed or uncertain result instead of treating it as ready for transfer.
Use an organization-approved procedure and device-specific documentation before any destructive action. The intended consequence is permanent data loss; this review deliberately provides no executable erase command.
Method, limits and the next unanswered question
We reviewed the full FAST paper's mechanisms, experiment design and erasure results, NIST's method and assurance guidance, and the named NVMe sections. We collected no new device measurements and did not reproduce the chip-level experiment. No manufacturer is rated here, and no universal recovery probability is inferred.
A valuable follow-up would test whether a deployment workflow records command acceptance and final operation status as separate events, using a disposable test fixture. That could validate the workflow without claiming to validate physical erasure. A hardware assurance study would require a separate design, suitable equipment and explicit authorization.
For routine deallocation, see what TRIM, UNMAP and fstrim actually promise, including readback semantics and thin-pool passdown.
Corpus: data sanitization, NVMe Sanitize, cryptographic erase, TRIM. Related: what NVMe health logs do and do not show.
Primary sources
- Wei, Grupp, Spada and Swanson, Reliably Erasing Data From Flash-Based Solid State Drives, USENIX FAST 2011, sections 2-3
- NIST SP 800-88 Rev. 2 (2025), sections 3 (including 3.2.5 traceability) and 4.5
- NVM Express Base Specification 2.0e, sections 5.14, 5.16.1.25, 5.17.2.1, 5.24 and 8.21
- util-linux: blkdiscard documentation
- NVM Express: NVMe Technology Solves Many Common Sanitize Operation Issues
- linux-nvme/nvme-cli: sanitize status log documentation
- NIST, Frequently Asked Questions for SP 800-88r2, published July 16, 2026, Q6-Q8
- linux-nvme/nvme-cli v2.11: Format NVM documentation
- NVM Express NVM Command Set Specification 1.0e, section 4.1.2
- linux-nvme/libnvme: Sanitize Status flags and fields (cross-check; the example is pinned to Base 2.0e)
- NVM Express Base Specification 2.3, Figure 302, pp. 296-297: later status-layout boundary
- T13 ATA/ATAPI-6 working draft 1410D revision 3a (2001), sections 6.15 and 6.21; historical draft, not an approved standard
- Seagate Laptop HDD Product Manual 100772113 Rev. C (2016), section 11.2.3: DCO capacity and READ NATIVE MAX
- Seagate openSeaChest maintainer clarification (7 January 2021), discussion 52: HPA/DCO versus AMAC erase scope
- T13 ACS-3 draft 2161-D rev. 5 (28 October 2013), Table 6; sections 4.5 and 7.2; section 7.39 Table 91
- Seagate openSeaChest ATA Security Feature guide (last edited 11 February 2026), Security Erase
- Chen and Sion. HiFlash: A History Independent Flash Device. arXiv:1511.05180v1 (2015), sections II, IV and VI.
- Roche, Aviv and Choi. A Practical Oblivious Map Data Structure with Secure Deletion and History Independence. arXiv:1505.07391v2, sections 1.2-1.3 and 3.
- Linux man-pages: unlink(2), Description
- Google Cloud KMS: Envelope encryption, data keys and key-encryption keys
- Google Cloud KMS: Key rotation, after you rotate keys
- AWS KMS: Rotate KMS keys, current material and unchanged data keys
- NIST SP 800-38F (2012): Methods for Key Wrapping, sections 3.1 and 5.2
- Google Cloud KMS: Re-encrypting data, workflow
- Google Cloud KMS: CMEK key rotation, integration patterns and resource-specific behavior
Individual source-review dates are retained in the metadata; the article update date does not imply that every source was rechecked. NIST DOI: 10.6028/NIST.SP.800-88r2. NVMe 2.0e is the explicitly cited revision, not a claim that it is the newest specification.