dm-integrity · shipping

dm-integrity

dm-integrity is a Linux device-mapper target that stores per-block integrity tags and can generate and verify them when configured with an internal hash.

Related Observatory article: Read on hesela.com

An upper layer supplying the tags is responsible for checking them; an internal CRC or HMAC has a different threat model. [1] In authenticated dm-crypt configurations, dm-crypt generates and checks the tags while dm-integrity provides their storage. This does not make every dm-integrity configuration authenticated or encrypted. [3] Bitmap mode can miss corruption coincident with a crash because dirty-region tags are regenerated. [4] Recovery mode bypasses checking rather than verifying a read-only view. [1] Journal MAC checks journal addressing; internal-hash replay checks block tags. Superblock read verification requires the configured journal MAC and persisted fixed-HMAC flag, outside recovery mode; a CRC is not adversarial authentication. [5]

Relations

related
Checksum, dm-verity, fs-verity, Crash consistency, dm-crypt, Authenticated encryption, dm-integrity recovery mode, Replay attack, Rollback protection, HMAC, Cryptographic nonce

Limitations

  • Journaled mode couples data and tag updates; direct mode can leave mismatches after a crash. This is not application-level transaction atomicity. [1]
  • Internal hashing does not itself authenticate the superblock. The Linux v6.12 recalculation guard distinguishes data keys, journal keys and the fixed-HMAC format; the legacy override bypasses this guard. Recalculation is not authentication of earlier contents. [5, 6]

Citations

  1. Linux v6.12 documentation: dm-integrity, integrity-tag ownership and journal/direct modes (accessed 2026-10-15)
  2. Linux v6.12: dm-crypt, encryption target, integrity metadata and allow_discards (accessed 2026-10-15)
  3. cryptsetup v2.8.1: integritysetup, bitmap mode, recalculation, recovery and legacy options (accessed 2026-10-15)
  4. Linux v6.12 dm-integrity.c: block checks, journal section MAC, superblock verification and recalculation guard (accessed 2026-10-15)
  5. cryptsetup merge request 128 (2021): HMAC recalculation fix and separate journal/superblock authentication (accessed 2026-10-15)

Further reading

  1. Hesela: Why a valid checksum can still return the wrong data (accessed 2026-10-15)
  2. Hesela: Recovery can stop checking the evidence (accessed 2026-10-15)
  3. Hesela: The journal needs its own protection boundary (accessed 2026-10-15)

JSON: /data/terms/dm-integrity.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. dm-integrity. Hesela. 2026-10-21. https://hesela.dev/terms/dm-integrity/